22

I've just upgraded my laptop from Xubuntu 17.04 to 17.10. After the final reboot, DNS has stopped working. This is obviously a problem! I can ping known IP addresses; just no DNS resolution.

I've not fiddled with any DNS settings; as far as I know, I had the standard DNS configuration previously. Its just a laptop which uses DHCP to get details from my home WiFi router.

Obviously, the ability to diagnose this is limited when the system itself can't resolve any web addresses. I did some googling on my phone, and most of the answers I found seemed to recommend turning dnsmasq off. However, dnsmasq was already off. But /etc/resolv.conf was showing 127.0.1.1, which seems to imply that it was expecting dnsmasq to be running.

I turned dnsmasq ON, by editing /etc/NetworkManager/NetworkManager.conf and adding

[main]
dns=dnsmasq

and then I ran this command

sudo systemctl restart NetworkManager

My DNS resolution is now working.

However, given that the default Ubuntu configuration is not to use dnsmasq, what should I actually have done to diagnose and fix this instead?

32

I was updating Ubuntu today form version 16.10 through 17.04 to 17.10. For me too DNS stopped working. The resolv.conf symlink was

/etc/resolv.conf -> /run/NetworkManager/resolv.conf

This is apparently wrong for 17.10. The error message the previous poster got is from the output of resolvconf -service:

$ systemctl status resolvconf

It gave the following output.

resolvconf[623]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf

By removing the original symlink, linking to /run/resolvconf/resolv.conf to /etc/resolv.conf and restarting the resolvconf -service DNS began working again:

$ sudo rm /etc/resolv.conf
$ sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
$ systemctl restart resolvconf

Interestingly the exit code of the resolvconf-service was success even before the symlink was pointing towards the correct file.

  • 2
    Fantastic! Exactly my issue. So... how does one alert Canonical about this? – Casey Oct 22 '17 at 16:21
  • You should probably file a bug report so this behavior on upgrade is fixed. – Panther Oct 22 '17 at 17:00
  • This is the only solution that worked for me, I had the same problem after installing ubuntu 17.10 from the website ~ 1 week ago. Thanks for sharing – edap Dec 7 '17 at 22:28
  • 1
    fixed my problem when switching from 17.04 to 17.10. issues with openvpn dns as well. – ferdy Mar 5 '18 at 8:36
6

I found this bug reported here: https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1725840; please confirm that you also suffering from it. It is resolved through a simple dpkg-reconfigure resolvconf.

1

I ran into the same issue and saw this looking at resolvconf

Oct 20 00:36:17 drew-8570w resolvconf[708]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf

Recreating the symlink fixed it. Now using 127.0.0.53 by default now?

$ ls -al /etc/resolv.conf 
lrwxrwxrwx 1 root drew 27 Apr  6  2017 /etc/resolv.conf -> /run/resolvconf/resolv.conf
$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53
  • Where did you saw the warning? What command should I run? – EnverOsmanov Oct 21 '17 at 13:43
  • Thank you, but this hasn't fixed the DNS problem for me. I tried the new symlink, but not working. I reverted back to the old symlink, also with dnsmasq in the config file, and this still works. As I asked earlier, does anyone know how I should diagnose this? – Conor O'Neill Oct 22 '17 at 15:59

protected by Community Nov 2 '17 at 8:24

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.