1

I've set up an OpenVPN daemon on an Ubuntu server of mine and as soon as I connect to it from my Ubuntu laptop with a Network Manager plug-in web pages won't open any more (but get ok as soon as I disconnect from the VPN).

I've tried to use command-line OpenVPN client and it works ok (both Internet and VPN are accessible). But when I use Network Manager - only local and VPN hosts are accessible.

2 Answers 2

2

You are most likely tunneling ALL traffic through the VPN. This "feature" is enabled by default in Network Manager, and it doesn't care what you have your OpenVPN settings set to.

From the VPN config in Network Manager, click "IPV4 Settings" tab, then select “Automatic (VPN) addresses only” from the "Method:" dropdown.

I had this same issue for quite a while and figured it was an issue with my OpenVPN config file, but alas, it's a feature of Network Manager.

Edit: You may also have to add a DNS server like Google public DNS to your DNS server list.

1
  • Most VPN solutions change your nameservers to point to the DNS servers given by the VPN. Many VPN providers only set up DNS for local domains, and do not have forwarding services.
    – earthmeLon
    Jul 8, 2015 at 22:50
1

The server needs to route out the client's internet request.

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

This is for the community version of OpenVPN, where '10.8.0.0/24' doesn't need to be changed unless you set a VPN network subnet to something else.

You must log in to answer this question.

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