Got a Droplet running as a server. It runs an NGINX server with with a few very simple web pages. Just installed OpenVPN Server on the same machine…its my own Private VPN.
I need to understand how the routing is done?
How can I find how OpenVPN routes traffic from the Internet and back to the Internet through the Droplet ?
Why can’t I access anymore my webpage served by NGINX from the Internet?
Answers are probably in plain sight down here but I don’t understand enough about routing.
root@My_Droplet:~# ip route
default via 138.197.160.1 dev eth0 proto static
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1
10.20.0.0/16 dev eth0 proto kernel scope link src 10.20.0.5
10.118.0.0/20 dev eth1 proto kernel scope link src 10.118.0.2
138.197.160.0/20 dev eth0 proto kernel scope link src 138.197.160.209
What I wants, is access to what NGINX is serving from the Internet through the VPN.
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya @sergerobitaille,
My first guess would be checking your Firewall and that is blocking your requests. Look for any rules that might be dropping or rejecting traffic on ports used by NGINX (typically 80 and 443).
VPN Configuration: Review your OpenVPN server configuration. Ensure that it is not configured to route all traffic through the VPN, which could change how incoming connections are handled. You might have a
push "redirect-gateway def1 bypass-dhcp"
setting in your OpenVPN server config file that needs attention.: Make sure that NGINX is set up to listen on all interfaces or specifically on the public interface (
eth0
). Check your NGINX config file (nginx.conf
and associated site configuration files in/etc/nginx/sites-available/
):Connectivity Tests: Perform connectivity tests from both inside and outside your VPN. Check if the NGINX server is accessible from the local network, from the VPN, and from the public internet: