0

I had set my router's DNS address to CloudFlare's 1.1.1.1 and 1.0.0.1. When I boot on linux it doesn't show those DNS' only 127.0.0.1. Cloudflare's DNS shows on Android and Windows 10, but not Ubuntu 16.04.

  • What are you using to configure the network? NetworkManager, /etc/network/interfaces, or other, and is it static or DHCP? – multithr3at3d May 3 '18 at 3:53
  • It's DHCP and I didn't configure the network on ubuntu. I'm just wondering why it didn't change to cloudflare on my laptop since I change the DNS for my router. – Slightly Higher Average User May 3 '18 at 4:18
2

Ubuntu may have pre-installed caching DNS resolver like dnsmasq or systemd-resolver .you can check if there any local DNS resolver listening to the port 53 using below command

netstat -plntu

this will show all the programs listening on all the ports TCP and UDP. if there is any then you have to stop that service or configure 1.1.1.1 as upstream DNS of your caching DNS server

  • lsof -i UDP:53 (or lsof -i UDP:domain) is a bit more concise ... – 0xC0000022L May 3 '18 at 9:52
  • OK, I disabled dnsmasq. And did cat /etc/reolv.dnsmasq. it now shows cloudflares DNS addresses. Am I good? Also is it OK if I uninstall dnsmasq? – Slightly Higher Average User May 3 '18 at 10:47
  • You can simply disable the dnsmasq if you want. And check the the file /etc/resolv.conf too. /etc/resolv.dnsmasq is only for dnsmasq itself – gripen fighter May 4 '18 at 2:57
0

If /etc/resolv.conf has nameserver set to 127.0.0.1, that probably means you have a local caching DNS resolver or even a local name server installed.

Typically, the DHCP-specified name servers would then be used as targets for DNS query forwarding in cases where the local cache/server does not have the answer. You might find them in /etc/resolv.dnsmasq, /run/named/named.forwarders or similar configuration file that is specific to the cache/server.

Basically, the majority of programs will read /etc/resolv.conf. It points the programs to use the local cache/server, which will have its own DHCP-managed configuration file. The local cache/server will then use the servers specified by DHCP as the upstream DNS source.

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.