0

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
nameserver 127.0.1.1

Here's my /etc/hosts

127.0.0.1   localhost
127.0.1.1   Bootes64
192.168.1.101   homeassistant
192.168.1.102   media
192.168.1.103   wdnas
192.168.1.120   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.

Walter
  • 341

2 Answers2

2

[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)
#     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

Then restart Network Manager: sudo service network-manager restart

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

1

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.

Walter
  • 341