1

I'm setting up a Raspberry Pi 3 as a DNS Server. I've configured it to use a Static IP Address using /etc/dhcpcd.conf and changed /etc/resolvconf.conf to use 127.0.0.1 as my nameserver, and /etc/resolv.conf reflects this with "nameserver 127.0.0.1" as the only listing.

My problem is the RasPi is resolving DNS, but I cannot figure out what DNS server it's using (besides itself). At one time, it was using another DNS server, so I figure it might still be using that somehow. But I cannot find anyplace that's referring a nameserver / DNS outside of 127.0.0.1. I'm trying to make sure the RasPi is using a specific resolver (eg, 8.8.8.8) but have no good way of confirming that's the case since it's resolving DNS without any external servers listed.

  • This sounds like a general *nix question rather than a Raspberry Pi specific question. – joan Apr 15 '17 at 16:14
  • Good point. I will also try that out! – zealeus Apr 15 '17 at 18:37
0

/etc/resolv.conf determines only the resolving DNS server that local programs use; how that server resolves is up to the server itself. If you're using bind, that would be in the configuration in /etc/bind/named.conf file and friends.

Typically, a resolving server (unless it's specifically configured to forward to another resolving server) does the resolution itself. Asked to resolve example.com, it will first go to the one of the root nameservers (from its preconfigured internal list) and ask about example.com and receive a reply telling it about the nameservers that serve things under .com. Contacting one of those with a query about example.com, it will then receive a reply giving the particular servers used by example.com. Sending the request to one of those will finally elicit the answer (e.g., an IP address) that it's seeking, and it will then return the answer to the client. Which servers it goes to after the root servers, and how many servers it needs to query before it gets to the end of this process, depends on the particular domain name it's looking up.

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.