I am running Ubuntu 20.04 and the machine is connected to my LAN via wifi.

I setup a raspberry pi hole on my local network and I want it to be my primary DNS.

The command resolvectl status looks OK to me for the wifi interface:

Link 3 (wlp111s0)
      Current Scopes: DNS              
DefaultRoute setting: yes              
       LLMNR setting: yes              
MulticastDNS setting: no               
  DNSOverTLS setting: no               
      DNSSEC setting: no               
    DNSSEC supported: no               
  Current DNS Server:     
         DNS Servers:     
          DNS Domain: ~.               

I can even even do an nslookup on the raspberry pi:

$ nslookup   name = pi.hole.

However, when I try to ping pi.hole, it looks like it is going out to my ISP's DNS (I have no idea how it figured out my ISP's DNS servers!)

$ ping pi.hole
PING pi.hole(pi.hole (2600:8800:1300:344:2372:fc5f:b162:37d3)) 56 data bytes

I expected pi.hole to resolve to

  • This forum is for Ubuntu related questions. please post your question on this forum:raspberrypi.stackexchange.com – ldias May 4 '20 at 18:36
  • I originally thought my problem was how I configured resolvctl on Ubuntu. Now I'm not so sure. It might be a quirk of the pi hole software. – ahoffer May 4 '20 at 20:38
  • Maybe try a name without a dot: see stackoverflow.com/questions/3523028/… The nslookup output wasn't pi.hole.lan like I expected. Can you ping pi.hole.lan? Pre 20.04, there was a need for the libnss-resolve package, but that doesn't seem to be needed in 20.04. – ubfan1 May 4 '20 at 22:35
  • I am an idiot. I was connected to a VPN when I tried to ping another host on my LAN. Sorry everyone. – ahoffer May 5 '20 at 22:44

You need to configure your router DNS settings and make your pi-hole your router's primary DNS. Then all internet traffic will be routed through the pi-hole.

Or manually change the DNS's all the computers on your network.

If your configuration is correct, then you should be able to access http://pi.hole or your pi's ip address from any computer on you LAN.

  • The DHCP on the router is disabled. The DHCP on the pi.hole is enabled. It turns out I can ping other hosts on the LAN, like "london" and "milan". For whatever reason, I cannot ping the hostname of the DHCP server itself ("pi.hole"). I think resolvectl is configured correctly. Might be just a limitation of Pi Hole. – ahoffer May 4 '20 at 20:37
  • @ahoffer Maybe this might solve your problem: discourse.pi-hole.net/t/pi-hole-resolves-but-i-cant-ping-it-wat/… – ldias May 4 '20 at 22:28

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.