Made one change in my usg pro queries went up by 10x... ::

Hello,

Thanks for taking the time to read my issue,

I've been using pi-hole for over 6 months on a raspberry pi and everything was working fine with no issues, except I couldn't see the number of clients connected.

Everything was being passed by USGPRO client

I followed this advice, saying i should change the DHCP Server on my unifi system and point it to my Pi-hole. I did this for all my 3 networks ( Guest, Default & Vip).

It worked as advertised new clients started showing up on the interface, but now i have several queries per seconds, non-stop...

(I've made this change a little before 02:00 am)

Should i be concerned ? Could my raspberry pi overload ?

Debug Token:

https://tricorder.pi-hole.net/5PsQd7x4/

How were addresses handed out before? How were your clients configured to use pi-hole for DNS?

My suspicion is that previously some of your network clients (maybe IoT devices) were NOT using pi-hole. By establishing pi-hole as your DHCP, every client on your network will use it for DNS, including things that 'call home' a lot.

You should be able to look at your top clients to see which devices and what domains are being requested.

1 Like

Agreed, what's probably happening now is all the LAN and WAN traffic from your USG-Pro is going to the Pihole device, when really you probably only want your LAN traffic doing that. If you set all your DHCP settings for the LAN networks you've defined, it should accomplish this.

The USG-Pro is likely doing a lot of querying back to ui.com for various housekeeping reasons and that's probably why your query numbers went up so much. You can keep it that way and it should work, but it's a lot of noise added to your stats.

1 Like

You can hover your mouse over the bars in the graph and see which clients are making the requests. You can also click the bars to see a selection of queries from that period. Don't be alarmed – your clients are doing all this DNS chatter on the network all the time, it's just that now for the first time you are able to see it. Your Pi is safe and won't overload, this is all easily handled by your Pi and Pi-hole.

1 Like

So you had your USPGPRO configured to use Pi-hole as its upstream DNS server, and now you have it point its DHCP clients to use Pi-hole as local DNS server instead.

In theory, that would only change the client your Pi-hole sees from one to many, but it wouldn't change the number of DNS requests your clients are sending, and it wouldn't change the number of DNS requests that your Pi-hole is receiving - provided your USGPRO would not have cached any of those DNS records.

In practice, your USGPRO likely did cache DNS replies, and that alone may explain a surge in numbers.

By chance, your debug log contains a signature series of DNS requests that would suggest you are running a monitoring software that targets DNS, quite probably netdata:

*** [ DIAGNOSING ]: Pi-hole log
-rw-r----- 1 pihole pihole 35M May 10 13:24 /var/log/pihole/pihole.log
   -----head of pihole.log------
   May 10 00:00:14 dnsmasq[1077]: config cachesize.bind is <TXT>
   May 10 00:00:14 dnsmasq[1077]: config insertions.bind is <TXT>
   May 10 00:00:14 dnsmasq[1077]: config evictions.bind is <TXT>
   May 10 00:00:14 dnsmasq[1077]: config hits.bind is <TXT>
   May 10 00:00:14 dnsmasq[1077]: config misses.bind is <TXT>
   May 10 00:00:14 dnsmasq[1077]: config servers.bind is <TXT>

Certain Netdata collectors would issue those requests as often as once per second.
Your USGPRO may have cached those requests and thus shielded your Pi-hole from seeing them all.

Would those queries make up the majority of the additional queries your Pi-hole is receiving?

If not, you want to verify that you didn't close a (partial) DNS loop:
Your debug log shows have enabled Pi-hole's Conditional Forwarding.
Are you still using Pi-hole as your USGPRO's upstream server?

1 Like

Before I just had my UniFi DNS Server pointed at pi-hole. Like this:

Now, i added the following settings to all 3 networks.
(Activate DHCP DNS Server)

it's turned off, should I turn it on?

Also after further debugging I believe, i found what seems to be the issue however i don't know to resolve it...

After looking at the queries, I have 4 devices that excessively high queries and all within the same range. Between 55,547 and 55,563 queries.

When i went to look at the IP addresses they correspond to my 4 Unifi access points, which on my unifi Web UI appear offline, even though everything is working fine and i have WiFi in all areas

What do you advise me to do?

I guess, I could always revert back to the first config, but i would lose all insights on clients...

When I had the same exact problem on my UniFi network, I just went to the individual Device Settings in the UniFi configuration and set the DNS entries to 9.9.9.9. UniFi devices won't be hitting anything but unifi.com addresses anyway, I think.

1 Like

You had Pi-hole as primary and 1.1.1.1 as secondary.
This probably caused Pi-hole to be bypassed.

In most systems primary and secondary are used at the same time.

Now you set only one DNS server and the DHCP server is advertising only Pi-hole's IP. All device are using Pi-hole.

This is probably one of the reasons for the increased number of queries observed here.

1 Like

Answering my questions would be a good start. :wink:

1 Like

Before I had my UniFi system set to use Pi-hole as a DNS server, now I've kept that setting and also added Pi-hole as the DHCP DNS Server as shown in the screenshots above.

Yes, you seem to be correct as all the new queries come from the 4 access points that currently appear offline (even though, they are working normally), and they are all pinging Unifi and unifi.localdomain.

Looking at the query log I don't think net data is the issue

yes

It's not enabled

How can I verify this ?

From the info I could gather, it seems my access points, are not able to ping my USG PRO.
Thus why they appear offline and keep querying Unifi non stop ? :thinking:

I can't seem to find this option for the access points

Thanks for taking the time to help me, and sorry if I cannot be of better assistance

At the risk of going way off-topic...

What I do on my Unifi setup is point all the Unifi devices, which use a static IP, to use my UDM-Pro (or in your case, the USG-Pro). To do that:
Go to Devices//Settings then scroll down to the Network section. Under IP Configuration/Static IP, enter the IP of your USG-Pro.

Then go back to your Internet connection setup under Settings/Internet and select your WAN connection. Scroll down to DNS servers and enter whatever public DNS servers you want your Unifi devices to use that aren't your Pihole.

That way the DHCP-provided DNS for your clients will be Pihole, but your Unifi devices will use the your Unifi gateway, which will use whatever public DNS you specified above.

2 Likes

Indeed, those look like Unifi equipment related lookups.
What is the output of:

dig unifi.localdomain
dig unifi @192.2.77.111
dig unifi @192.2.77.1

Configuring your Unifi nodes as suggested by nprampage' should take them off Pi-hole - it's worth giving that a try.

Netdata may still contribute to your observed increase in query volume.
The following statements could help in finding busy clients and/or domains from the last 24 hours:

echo ">stats >quit" | nc localhost 4711
echo ">top-clients>quit" | nc localhost 4711
echo ">top-domains >quit" | nc localhost 4711
echo ">top-ads >quit" | nc localhost 4711
1 Like

@nprampage

I will try your suggestion Sunday, and report the results here.

dig unifi

; <<>> DiG 9.16.37-Debian <<>> unifi
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 36616
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;unifi.                         IN      A

;; AUTHORITY SECTION:
.                       84642   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2023051200 1800 900 604800 86400

;; Query time: 11 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri May 12 17:49:36 BST 2023
;; MSG SIZE  rcvd: 109

dig unifi 192.2.77.111

; <<>> DiG 9.16.37-Debian <<>> unifi 192.2.77.111
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 24061
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;unifi.                         IN      A

;; AUTHORITY SECTION:
.                       84914   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2023051200 1800 900 604800 86400

;; Query time: 11 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri May 12 17:49:49 BST 2023
;; MSG SIZE  rcvd: 109

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 63471
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;192.2.77.111.                  IN      A

;; AUTHORITY SECTION:
.                       86371   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2023051200 1800 900 604800 86400

;; Query time: 15 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri May 12 17:49:49 BST 2023
;; MSG SIZE  rcvd: 116

dig unifi.localdomain 192.2.77.1

; <<>> DiG 9.16.37-Debian <<>> unifi.localdomain 192.2.77.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 7910
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;unifi.localdomain.             IN      A

;; AUTHORITY SECTION:
.                       86388   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2023051200 1800 900 604800 86400

;; Query time: 19 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri May 12 17:49:57 BST 2023
;; MSG SIZE  rcvd: 121

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 60592
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;192.2.77.1.                    IN      A

;; AUTHORITY SECTION:
.                       86400   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2023051200 1800 900 604800 86400

;; Query time: 27 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri May 12 17:49:57 BST 2023
;; MSG SIZE  rcvd: 114

Could you please rerun the two dig statements targetting your Pi-hole's and your router's IP?
They were supposed to contain an @ before the IP.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.