Update: Looks like it's
avahi-dnsconfd that's adding
18.104.22.168 to my
/etc/resolv.conf file. I found this in /var/log/syslog:
Jan 4 17:00:21 freewill nm-dispatcher: req:1 'up' [ens33]: start running ordered scripts... Jan 4 17:00:21 freewill avahi-dnsconfd: New DNS Server 22.214.171.124 (interface: 2.IPv4) Jan 4 17:00:21 freewill avahi-dnsconfd: New DNS Server 126.96.36.199 (interface: 2.IPv4)
How can I make Ubuntu fetch DNS servers from DHCP only and not use Avahi (mDNS) for fetching DNS servers?
I am testing out Ubuntu Mate 16.04.1 LTS, and having trouble because something keeps adding Google's DNS servers to
josh@freewill:~$ 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 nameserver 10.100.1.1 nameserver 188.8.131.52 nameserver 184.108.40.206 search my.domain.name
I don't want
/etc/resolv.conf because that breaks my local network: My local DNS server (10.100.1.1) serves DNS for local NATed services which don't have public DNS records.
If I manually edit
/etc/resolv.conf and remove the Google DNS nameservers, they get added back again by a reboot or
NetworkManager does not have 220.127.116.11 nor 18.104.22.168 listed under Additional DNS Servers so that's not the cause.
The system has three ethernet interfaces, only one is connected. It's on a network with a DCHP server that provides DNS information. Contents of
# interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback
I have run
grep -R '8\.8\.8\.8' /etc and there's no other reference to
22.214.171.124 in any config file. Nothing under
/etc/resolvconf refers to Google DNS servers, either!
Why is Ubuntu Mate adding Google DNS servers to
/etc/resolv.conf and how can I make it stop? For now, I've done
sudo rm /etc/resolv.conf; sudo cp /run/resolvconf/resolv.conf /etc/resolv.conf; sudo chattr +i /etc/resolv.conf but I know that in the future this will bite me...