After 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.
- Go to your OpenVZ configuration panel and enable TUN/TAP.
- Reset the IPtables (see below), the -P paramter stands for ‘Policy’
- 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
Worked for me in 2018 with OpenVPN port-sharing with Apache2.