Solved: Apache webserver unreachable after installing OpenVPN

OpenVPNAfter installing OpenVPN on a VPS running Linux (i.e. Ubuntu), my website that was hosted on that VPS running Apache webserver was no longer reachable. When I tried to connect to that website, the connection timed out.

Apparently, something was messing with the functionality of Apache, which no longer worked properly. Apache was running fine when I check the status of the service:

root@ubuntu:/# service apache2 status
 * apache2 is running

I had been working on the firewall when installing OpenVPN, as well as packet forwarding. Because this VPS is running within OpenVZ (a container-based virtualization for Linux), I had to make some changes.

  1. Go to your OpenVZ configuration panel and enable TUN/TAP.
  2. Reset the IPtables (see below), the -P paramter stands for ‘Policy’
  3. Flush everything (see below), the -F paramter stands for ‘Flush’, and then try to reload the website that was previously down!
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD

 

Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.

 

One thought on “Solved: Apache webserver unreachable after installing OpenVPN

Leave a Reply

Your email address will not be published. Required fields are marked *