Ubuntu 16.04
After moving office I set the DNS settings via Network GUI (see here) to my new values. Internet connection is there, but name resolution seems very slow. My interpretation is, it tries to name-resolve with old settings which times-out after around 5 sec, then tries and succeeds (fast) with new settings.
But whatever I do, the old values are always "in the system" somehow.
After a reboot:
/etc/resolvconf/resolv.conf.d/head
contains the old DNS addresses/etc/resolvconf/resolv.conf.d/base
contains the new DNS addresses/etc/resolv.conf
(run/resolvconf/resolv.conf
) contains old DNS addresses (fromhead
) followed by values in/run/resolvconf/interface/NetworkManager
(which containslocalhost
andsearch
-parameter)
/etc/network/interfaces
does not contain much:
auto lo
iface lo inet loopback
I added the new DNS settings into /etc/dhcp/dhclient.conf
without effect.
The only remedy so far is to manually edit /etc/resolv.conf
after each boot.
So, question: how can I make Ubuntu forget the old settings (the ones in /etc/resolvconf/resolv.conf.d/head
which are auto-generated).
No nscd
installed. This would seem one way to do it, but I guess there must be a better one.
Not tried option: install dnsmasq and configure as described here (again I think it should be possible without that)
/etc/resolvconf/resolv.conf.d/head
is used for the file/etc/resolv.conf
. If you remove any lines from thehead
file they should not return. The first line in thehead
file is talking about the/etc/resolv.conf
file that gets generated when you runsudo resolvconf -u
. – Terrance Dec 21 '17 at 03:21DO NOT EDIT THIS FILE BY HAND
. So in my thinking whatever I do, next time I have issues this file will contain the old info too. – tokosh Dec 21 '17 at 05:20/etc/resolv.conf
is missing thebase
content but at least the wrong settings are gone. If you want you can write this as an answer. – tokosh Dec 21 '17 at 09:58