Ubuntu – Ubuntu 16.04.1 tells me the DNS server is 127.0.0.1

dns

Which isn't very useful. (yes that's the local node).

I'm trying to switch from the DNS server address hardcoded into a new Comcast router to OpenDNS configured onto a secondary home wifi router and I'd like to check the result. I've logged into opendns.com and checked the stats but have found no traffic.

patfla@patfla-N550JV:/etc/network$ nslookup google.com
Server:     127.0.1.1
Address:    127.0.1.1#53

Non-authoritative answer:
Name:   google.com
Address: 216.58.195.238

patfla@patfla-N550JV:/etc/network$ 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 127.0.1.1
search SECONDARY-ROUTER-NAME
patfla@patfla-N550JV:/etc/network$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
wireless-essid   Blah           <- this hardwires me to use the secondary router
patfla@patfla-N550JV:/etc/network$ 

Best Answer

Put /etc/NetworkManager/NetworkManager.conf back to its original setting.

Don't edit /etc/resolv.conf.

Instead, go to the network icon in the top panel, and select Edit Connections. Assuming that you're using an ethernet connect to your computer, edit the script called Wired Connection. Select the IPV4 tab, change the 'Method' from 'Automatic (DHCP)' to 'Automatic (DHCP) Addresses Only' using the dropdown, and enter your desired DNS servers, comma-separated, into the box DNS Servers.

You can also enter the new DNS server information directly into your wifi router.

Cheers, Al

Related Question