CRAP I finally got it!

Now some people might not like the idea of disabling systemd, but as I
explain below, I'm not seeing problems on simple networks.

sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop

Delete the symlink /etc/resolv.conf
rm /etc/resolv.conf

Install openresolv

Edit NetworkManager.conf

[main]
plugins=ifupdown,keyfile
rc-manager=resolvconf
dns=default

Restart network-manager
sudo service network-manager restart

Edit resolvconf.conf

name_server_blacklist=192.168.1.1

I have as example 192.168.1.1 to block my router, put in the nameserver
that appears in resolv.conf you want to block when starting the VPN.

Now when you check resolv.conf before connecting to the VPN it will look
like this as example;


# Generated by NetworkManager
nameserver 192.168.1.1

Connect now to your VPN and it will look like this as example;

# Generated by resolvconf
nameserver 12.1.12.1


ENJOY! :)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1755675

Title:
  Ubuntu 17.10 OpenVPN DNS Leaks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1755675/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to