Please follow the below template, it will help us to help you!
Expected Behaviour:
ntp should resolve easily from both the router and pihole when a command like sudo ntpdate -d -q pool.ntp.org
works from one of the local network clients. Local clients should get issued with IP addresses by the DHCP server of the pihole.
Actual Behaviour:
ntpdate fails with DNS issues; logs show that - for example - a lookup for 2.debian.pool.ntp.org works one minute but a few seconds later will fail (shouldn't it be cached) and localhost (in the pihole logs, so presumably the rpi running pihole itself) is making 12000 requests for DNS resolution of pool.ntp.org addresses in 24hours. It actual looks up the same address twice in 1s, despite the first lookup getting a "OK (forwarded)" response [shouldn't the 2nd be OK (cached)?].
When this is happening DHCP fails. It doesn't work even with a reboot. nmap
reports that port 53 is open at this time, clients (who were connected and so have IP already) can ping the pihole successfully. DHCP on the router can be turned on again (and off on the pihole) in order to fix the problem.
To repeat: This is an intermittent failure, it all works for a couple of days before failing.
Debug Token:
Currently not working, formerly https://tricorder.pi-hole.net/gwq3fmkvtq
Router info:
My router is an "EE smart hub" with a MAC of "94:6A:B0:..." suggesting it is an arcadyan product; AFAICT it's a rebranded "BT home hub" of some sort(?). Nmap tells me it's running OpenWRT but it's locked down, at least I can't get a shell on it.
It logs output such as
00:12:32, 01 Jan. NTP synchronization failure
00:12:17, 01 Jan. NTP synchronization start
This happens when restarting the router, as I have now (looks like there's no battery, or datetime isn't saved?) and at random other times over which I have no control, the router config has no NTP settings exposed.
Pihole setup and narrative of issue appearance:
I have pihole set to do DHCP, which has been working fine.
What happened was the router failed to do ntp sync, which caused the pihole to then be unrecognised, I think, losing its IP address as seen from the router. So, then no DNS worked. I fixed this by temporarily enabling DHCP (made authoratitive) on the router again, the pihole appeared then to be routable and re-disabling the router's own DHCP then appeared to make things work again.
But both pihole and router don't appear to be able to do ntp properly.
When pihole -- on which I installed ntpdate for debugging -- fails to resolve the NTP servers a client on my network can resolve and communicates perfectly well with the same servers (presumably using the pihole for the DNS); but simultaneously the router is unable to sync NTP either ...
This post here appears to describe the same issue, but claims it was fixed by re-enabling the piholes settings for "never forward" (at /admin/settings.php?tab=dns), but I have those 2 settings enabled already and haven't disabled/changed them (and the pihole was working).
This post about a Synology router sounds like it could be the same issue too, but that post was unresolved too it seems.