Please follow the below template, it will help us to help you!
Expected Behaviour:
Macs that are pointed to pi-hole should receive DNS responses from pi-hole.
Actual Behaviour:
I have 2 different Macs that both display the same issues reaching pi-hole for DNS resolution. They can ping the IP of the pi-hole, but they cannot get a response to DNS requests. dig @ apple.com will time out with "connection timed out: no servers could be reached".
However, other devices on the network seem to be working fine. The pi-hole dashboard shows increasing counters in all categories and tests from iPhones show pages being blocked by pi-hole. Issue seems to be limited to the Macs on the network.
Because the Macs cannot reach pi-hole they fail-over to the other DNS server configured in the router (1.1.1.1).
Thanks for the reply. I set up the secondary DNS (1.1.1.1) because without it, my hosts would not be able to browse anywhere when the pi-hole stop responding to them. When I see ads on one of the Macs, I would do a quick "dig" to see what DNS server I was using and then a dig directly to 192.168.22.53 to see if I could get a response from pi-hole. For whatever reason, pi-hole will randomly disappear from the Mac's perspective and they would switch over to 1.1.1.1. Doing the dig directly to the pi-hole would just time out.
Here is the output you requested. I manually set 192.168,22.53 as the only DNS server to gather this output. It should also be noted that other hosts on my network seem to be using the pi-hole without issue. I can try to verify that a bit more but I'm hoping to figure this out via the Macs if possible.
[~]$nslookup pi.hole
;; connection timed out; no servers could be reached
[~]$
[~]$nslookup pi.hole 192.168.22.53
;; connection timed out; no servers could be reached
[~]$
[~]$scutil --dns
DNS configuration
resolver #1
nameserver[0] : 192.168.22.53
flags : Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
resolver #2
domain : local
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300000
resolver #3
domain : 254.169.in-addr.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300200
resolver #4
domain : 8.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300400
resolver #5
domain : 9.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300600
resolver #6
domain : a.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300800
resolver #7
domain : b.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 301000
DNS configuration (for scoped queries)
resolver #1
nameserver[0] : 192.168.22.53
if_index : 5 (en0)
flags : Scoped, Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
I figured out the issue. The pihole was was using both wired (eth0) and wireless (wan0) and they both had the same IP address. I'm guessing this was causing some routing/switching confusion in the network that resulted in the periodic loss of connectivity to the pihole from the hosts. I've disabled the wireless interface and it's been stable. Thanks for the help.