Mesh wifi network with one IP pointing to the pihole (192.168.1.250), network with other services(nas, cameras), pc and a router. Everything pointing to the pihole as a DNS.
As of a few days ago Pihole started logging millions of PTR entries every day (20-30mln daily, all answered with SERVFAIL). The problem is that the Pihole slows down, then CPU gets to 100% (so resolving takes 10s) and after a few hours logs use up all of the free disk space and everything crashes until I manually clean up logs and db.
What I tried:
disabled conditional forwarding
disabled mDNS on all clients
pihole -r
tried using ANALYZE_ONLY_A_AND_AAAA=true
tried rm /etc/pihole/pihole-FTL.db
looked for the source of queries but with no luck
removed all adlists and got new ones
changed DNS servers (from unbound to normal DNS.WATCH etc)
disabling rate limiter (wifi reaches the limit in ~1s)
Oct 16 16:57:37 dnsmasq[25564]: query[PTR] 121.248.66.18.in-addr.arpa from 192.168.1.250
Oct 16 16:57:37 dnsmasq[25564]: forwarded 121.248.66.18.in-addr.arpa to 127.0.0.1
Oct 16 16:57:37 dnsmasq[25564]: forwarded 121.248.66.18.in-addr.arpa to 127.0.0.1
Oct 16 16:57:37 dnsmasq[25564]: reply error is SERVFAIL
Oct 16 16:57:37 dnsmasq[25564]: query[PTR] 121.248.66.18.in-addr.arpa from 192.168.1.250
Oct 16 16:57:37 dnsmasq[25564]: forwarded 121.248.66.18.in-addr.arpa to 127.0.0.1
Oct 16 16:57:37 dnsmasq[25564]: forwarded 121.248.66.18.in-addr.arpa to 127.0.0.1
Oct 16 16:57:37 dnsmasq[25564]: reply error is SERVFAIL
Oct 16 16:57:37 dnsmasq[25564]: query[PTR] 121.248.66.18.in-addr.arpa from 192.168.1.250
Oct 16 16:57:37 dnsmasq[25564]: forwarded 121.248.66.18.in-addr.arpa to 127.0.0.1
Oct 16 16:57:37 dnsmasq[25564]: forwarded 121.248.66.18.in-addr.arpa to 127.0.0.1
Oct 16 16:57:37 dnsmasq[25564]: reply error is SERVFAIL
All of them point to:
|[123.248.66.18.in-addr.arpa]
|[121.248.66.18.in-addr.arpa]
|[9.248.66.18.in-addr.arpa]
|[119.248.66.18.in-addr.arpa]
I think I found the problem. None of the client were making any amazon calls (disconnected all but 7APs and CCTV). Most of the calls were coming from outside the network (probably DNS spoofing). DNS was rejecting them all (wrong checksum). After sealing any inbound access from outside the network it seems to be working fine so far.
So for anyone having similar problem:
"sudo tcpdump -n port not 22" and look for strange IP addresses asking for resolutions.
In one of my past configs, I used a DNSMasq layer above my Pihole's to respond to DNS queries. I'd like to have pihole not only respond to A and CNAME records, but also respond to local queries for PTR records. The DNSMasq in Pihole can serve this function, but must be configured to do so just like A records and CNAMEs. Often, firewalls, client software, etc requests PTR records for local devices. Can we just allow Pihole to create PTR records automatically for identified devices? Feature request! And offer the function of creating PTR records in the "Local DNS Records". Do A record entries create PTRs? That might be the method. Just asking.
Not quite.
Pi-hole already creates the respective PTR records, e.g. when you add Local DNS Records.
However, this is unrelated to OP's issue - they were seeing PTR requests for public IP addresses from certain clients.
They were able to eliminate those requests by
Yeah, I figured that out after adding some. One possible bug here was I used the custom entries file and they don't properly show up in the UI. I also like the idea of automation to add hostnames from Netbios.