So I see there are lots of issues on this. I've read through all the posts, but cant seem to find a permanent solution on this. I have Ubuntu 17.10 and everytime my computer reboots, I have to reset the dns servers.

The only solution that seems to work for me is to:

  1. Add google's DNS servers to my /etc/resolv.conf file.
  2. Verify they are listed in my network manager gui
  3. Restart network manager. (sudo systemctl restart NetworkManager)

Im not sure why adding the dns servers to resolv.conf works, only to have it overwritten, but I'f I dont. My DNS doesn't work.

I know this is not the proper way, but every other method I've tried seems to fail. The other issue I have is, I have several other computers on the local network (raspberry pi's) I can't ssh into them using their names. I can with their IP address.

Here's my current resolv.conf

# Generated by NetworkManager

Here's my /etc/hosts   localhost   Bootes64   homeassistant   media   wdnas   security

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Is there a permanent solution to this?

EDIT This has been marked as a duplicate of a similar issue, However That is one of the first questions I ran across with google. NONE of the suggestions there work. and Seeing as the last update was in 2014, I have some serious misgivings that it will work on a 17.10 machine.

  • What is the actual problem here? – fkraiem Nov 22 '17 at 5:35
  • Have you considered using NetworkManager to add your DNS servers seeing as how it's what's generating your resolv.conf file? See askubuntu.com/questions/2321/… – Elder Geek Nov 22 '17 at 18:21
  • After a reboot, the network manager does not list any DNS servers. I have to manually put them in. However after restarting networking manager nothing changes in my resolve.conf. if I put the dnsservers in my resolv.conf first...then check my Networkmanager they are listed. Only then can I restart networkmanager and see the in the resolv.conf – Walter Nov 23 '17 at 14:24
  • Did you try to set the DNS server through NetworkManager as the answers to the linked question suggest? NM didn't change that much since 2014. – David Foerster Nov 23 '17 at 18:03
  • Yes. The steps I have tried include: 1 Reboot. 2: Add dns servers to NetworkManager 3. close network manager 4. Check connection (dns not working) 5: check resolv.conf Nothing listed. 6: Put namserver into resolv.conf 7: Sudo networkmanager restart 8: Check connection. Working. Basically the network manager only seems to get the DNS settings IF if put them in resolv first. – Walter Nov 28 '17 at 0:15

[re-written for simplicity - hope it helps]

Can you run systemd-resolve --status ? Does it return DNS info about your network adapters?

If so then run sudo dpkg-reconfigure resolvconf

And make sure /etc/resolv.conf reads:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.


Then restart Network Manager: sudo service network-manager restart

The systemd resolver works with the other resolvers and choose what's appropriate.


I know its not the correct answer- But I ended up just reinstalled 17.10 from a fresh install. Nuke and Pave. Now my DNS works correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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