OpenVPN All Internet, not LAN

Sayth

Gawd
Joined
Oct 7, 2001
Messages
618
Hey all,

So I've installed OpenVPN on an Ubuntu 16 VPS. I used https://github.com/Nyr/openvpn-install to do the install. (Don't judge me...)

So I can use OpenVPN GUI for Windows and connect with NO problem! I get my VPS' external IP and all is well. Except... I can't access my local Apache web server. The traffic must be being routed through my VPS and well it doesn't know about my LAN of course.

How can I maintain web traffic over VPN, but allow local traffic still? I'm guessing it's an iptables rule, but my brain can't think of what to use and I'm finding surprisingly little online.

Thanks!
 
You just need to enable/configure a split tunnel which is pretty simple. You can make a static route on your client so it goes to your regular gateway when trying to reach a certain IP in your network.

Just Google "OpenVPN split tunnel".
 
Back
Top