Ubuntu – Having DNS Issues when connected to a VPN in Ubuntu 13.04

13.04dnsvpn

I am connecting to a Cisco VPN Server using vpnc. Once connected, my machine was unable to automatically update DNS setting from the new VPN. I tested by temporarily changing /etc/resolv.conf with the proper nameserver and search domain, and everything worked. This is obviously not a long term solution, so I added an additional DNS server and search domain to the VPN settings in Network manager. With those settings in place, resolvconf does add the search domain, but not the DNS IP, and I still cannot do any lookups.

What is my next step in configuring or troubleshooting from here?

Best Answer

First make sure that there are no lines beginning with nameserver in any files in /etc/resolvconf/resolv.conf.d. If /etc/resolvconf/resolv.conf.d/tail is a symbolic link to target original, make it point to /dev/null.

Second, disconnect from the VPN. Edit /etc/NetworkManager/NetworkManager.conf

$ sudo gedit /etc/NetworkManager/NetworkManager.conf

and comment out

dns=dnsmasq

(i.e., add a # so that it looks like the following)

#dns=dnsmasq

and then

sudo restart network-manager
Related Question