1
1
I am running Ubuntu 12.04 LTS but have configured NetworkManager to NOT use its built in dnsmasq for DNS resolution (by commenting out dns=dnsmasq
in /etc/NetworkManager/NetworkManager.conf
) as suggested by this Ubuntu bug report. This works fine and results in a /etc/resolv.conf
file that contains actual DNS servers in it, rather than a reference to NetworkManager's dnsmasq
running on localhost
.
nameserver my.isps.name.server
search my.isp.com
The problem occurs when I attempt to connect to my VPN provider. My VPN provider is set up so that it pushes DNS server configuration down to the clients. And indeed this appears to be working, for when I connect to my VPN server, my resolv.conf
gets updated to:
nameserver vpn.dns.server.1
nameserver vpn.dns.server.2
nameserver my.isps.name.server
search my.isp.com
My problem is that while the VPN connection is up, I want to completely eliminate my ISP's DNS settings from the picture (that is, get rid of the nameserver my.isps.name.server
and search my.isp.com
lines in my above examples, ONLY keeping the settings for the DNS servers that were pushed down by the VPN) Unfortunately I can't figure out a way to do this. I tried doing this with a custom up
script, but it appears that NetworkManager-openvpn itself uses its own up
script.
Any ideas?