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 as my nameserver, and /etc/resolv.conf reflects this with "nameserver" 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 I'm trying to make sure the RasPi is using a specific resolver (eg, but have no good way of confirming that's the case since it's resolving DNS without any external servers listed.

  • 1
    This sounds like a general *nix question rather than a Raspberry Pi specific question.
    – joan
    Apr 15, 2017 at 16:14
  • Good point. I will also try that out!
    – zealeus
    Apr 15, 2017 at 18:37
  • I use a surfshark vpn tunnel with openvpn and I wonder why my DNS server still shows my local router. It should point to something outside my LAN because all traffic should be forwarded through the tunnel. So, any new insights on this topic are welcome!
    – bomben
    Oct 8, 2022 at 11:35

1 Answer 1


/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 and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.