No internet access when VPN connected
I have an OpenVPN config that I use on my Windows XP box and on my Ubuntu machine.
When I use it with my Windows machine, I can connect to the VPN and access sites on the VPN, and the internet as normal. When I use it on my Ubuntu box, when connected to the VPN, I can only access internal sites - No internet access at all.
I'm sure there is a way to configure OpenVPN on Ubuntu to allow internet connections, but I can't figure out how.
Solution 1:
Found it - The option is under "IPv4 Settings", "Routes", "Use this connection only for resources on its network".
Solution 2:
VPN connection settings -> IPv4 Settings -> Routes
Check "Use this connection only for resources on its network".
Now if you can only access web sites but can't reach vpn network resources - you have to manually add routes to them (and maybe also check "Ignore automatically obtained routes")
For example I want to access resources on the vpn network with ips like 10.*.*.*
, this configuration works for me:
Update for 18.04: gateway value is a must now, so enter "0.0.0.0"