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: 192.168.0.11
DNS Servers: 192.168.0.11
2001:578:3f::30
2001:578:3f:1::30
DNS Domain: ~.
lan
I can even even do an nslookup
on the raspberry pi:
$ nslookup 192.168.0.11
11.0.168.192.in-addr.arpa 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 192.168.0.11
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.