22

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.

0

2 Answers 2

33

Found it - The option is under "IPv4 Settings", "Routes", "Use this connection only for resources on its network".

6
  • Exactly, cos your vpn server config , push their route to you Mar 6, 2011 at 2:46
  • Please stick on using a single account. If the answer solves your problem, mark it as accepted.
    – Lekensteyn
    Mar 6, 2011 at 10:38
  • Can't understand what you are suggesting. Where is "IPv4 Settings", "Routes" Mar 16, 2013 at 20:03
  • 2
    @JKAUSHALYA in the Network Manager config, if you're editing the VPN connection, there are tabs for IPv4 and IPv6 settings. In those tabs, there is a button at the bottom labeled "Routes..." which brings up a window with the options referenced in this answer.
    – btleffler
    May 12, 2014 at 17:05
  • 3
    @user11891 Not worked for me. The internet connection is working when I connect to the VPN, but now I can't access the VPN machines.
    – ayr-ton
    Oct 28, 2014 at 17:24
11

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:

enter image description here

Update for 18.04: gateway value is a must now, so enter "0.0.0.0"

1
  • Fine!Work for me.
    – Green Lei
    Dec 29, 2015 at 10:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .