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?


2 Answers 2


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


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


and then

sudo restart network-manager
  • 12
    Restart networkmanager on Ubuntu 16.04: sudo systemctl restart NetworkManager May 25, 2016 at 13:54
  • 6
    Another modern restart method: sudo service network-manager restart
    – Reinderien
    Jul 28, 2016 at 2:33
  • 1
    Looks like this is bug from dnsmasq side? Correct?
    – ipeacocks
    Dec 20, 2016 at 10:57
  • 8
    It is amazing to me that this is still a problem in 16.10 after 3 years. Dec 29, 2016 at 13:44
  • 3
    +1 -- Ubuntu 16.04 - Same issue. Same solution. Thanks May 7, 2017 at 7:17

Try checking if your /etc/resolv.conf have symbolic link to /run/resolvconf/resolv.conf . It solved the problem for me.

To check if it has symbolic link:

ls -la /etc/resolv.conf

Sample output, if it has symbolic link:

lrwxrwxrwx 1 root root 27 Jun 30 22:22 resolv.conf -> /run/resolvconf/resolv.conf

Otherwise, delete or backup existing /etc/resolv.conf and then:

sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
  • 1
    This solution worked perfectly for me, thanks!
    – PKKid
    Feb 5, 2016 at 15:46
  • This is the solution that worked for me, thanks!!
    – Whome
    Nov 14, 2016 at 14:13
  • After a recent apt upgrade DNS when connected to my VPN became broken. This symlink was the solution that fixed things for me, thanks! I have also used the accepted answer above when my DNS was patchy (seemed a to come and go when connected to the VPN) so I think these are both good solutions, but apply in slightly different situations. Feb 20, 2017 at 9:35
  • Thank you!! Mine was oddly set to resolv.conf -> ../run/resolvconf/resolv.conf (note the ../)
    – James
    Feb 23, 2017 at 3:05
  • On Ubuntu 22.04 ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf Feb 24, 2023 at 20:35

You must log in to answer this question.

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