I'd like my DNS queries to not be used to advertise/track me.

I'm using this site to check for leaks.

The client is Ubuntu GNOME 16.04 and the server is configured like this.

The VPN works. Through the GUI, it leaks DNS.

sudo apt-get install network-manager-openvpn-gnome
# settings -> network-> + (lower left) -> VPN -> Import from file...

There is a work-around for the leaks, but it doesn't work from network manager.

Ubuntu GNOME's tools also can't configure to automatically connect to VPN's w/o running nm-connection-editor and configuring each WiFi connection.

It seems like this should be set-and-forget. How to do that?

Is there a way to automatically connect the VPN when network connections happen?

Essentially this command: sudo openvpn --config client.ovpn

Thanks in advance!


I edited /etc/default/openvpn and uncommmented this line: AUTOSTART="all"

Then copied the client.ovpn file to /etc/openvpn/client.conf.

After boot, the network works and no DNS leaks. If I switch the WiFi connection, the WiFi connects, but OpenVPN doesn't appear to reconnect (browsers don't work).

I can get OpenVPN to reconnect with this command:

sudo service openvpn restart

So, that get's me: works on boot and doesn't leak.

It's not set-and-forget because of having to restart openvpn service, but at least it's fail fast.

Any suggestions?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.