# Too many queries made when 'Conditional Forwarding' is enabled

**URL:** <https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828>\
**Category:** Help\
**Tags:** v4-0\
**Created:** [August 13, 2018, 7:40am UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828 "2018-08-13T07:40:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 7:40am UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/1 "2018-08-13T07:40:21Z")

</div>

#### Please follow the below template, it will help us to help you!

## Expected Behaviour:

No additional queries should be made, certainly not hundreds, if not thousands every second.

## Actual Behaviour:

Too many queries are being made every second, when Conditional Forwarding is turned on.

My router's IP is 10.0.0.1 and the Pi's IP is 10.0.0.6, with the local domain name being RT-AC87U.

Screenshots:

[https://www.dropbox.com/s/uqil52v7u8gk524/Screenshot%202018-08-12%2021.01.43.png?dl=1](https://www.dropbox.com/s/uqil52v7u8gk524/Screenshot%202018-08-12%2021.01.43.png?dl=1)

[https://www.dropbox.com/s/3llie39wbv5nudx/Screenshot%202018-08-12%2021.01.46.png?dl=1](https://www.dropbox.com/s/3llie39wbv5nudx/Screenshot%202018-08-12%2021.01.46.png?dl=1)

[https://www.dropbox.com/s/v3pq4cuhlizx98g/Screenshot%202018-08-12%2021.01.48.png?dl=1](https://www.dropbox.com/s/v3pq4cuhlizx98g/Screenshot%202018-08-12%2021.01.48.png?dl=1)

## Debug Token:

I uninstall and re-installed after too many queries were flooding the dashboard and possibly performance. Debug token of fresh install: 5drm4rvoya

---

<div class="post-metadata">

**Author:** ![Therion87](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/therion87/32/4666_2.png) [@Therion87](https://discourse.pi-hole.net/u/Therion87)\
**Post date:** [August 13, 2018, 11:45am UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/2 "2018-08-13T11:45:52Z")

</div>

Do you have your WAN DNS settings pointed to the PiHole in your router?

I noticed this behavior when I had that setup enabled in my RT-AC3100.

I now point my WAN DNS to 1.1.1.1, 1.0.0.1, and use the LAN DHCP server to assign my clients the PiHole address for DNS for blocking purposes. This stopped the flood of DNS queries.

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 11:50am UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/3 "2018-08-13T11:50:01Z")

</div>

Yes it does as a matter of fact.

---

<div class="post-metadata">

**Author:** ![Therion87](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/therion87/32/4666_2.png) [@Therion87](https://discourse.pi-hole.net/u/Therion87)\
**Post date:** [August 13, 2018, 11:58am UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/4 "2018-08-13T11:58:12Z")

</div>

Changing that, clear your logging and reboot. It stills start to function as expected.

Not sure if it's a conditional forwarding issue or not. That is a workaround I found for now, I'm following CF tickets myself to see if any other light is shed on it.

Hope this helps a bit.

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 11:59am UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/5 "2018-08-13T11:59:01Z")

</div>

Alright. Now I can't open [http://pi.hole](http://pi.hole)

---

<div class="post-metadata">

**Author:** ![Therion87](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/therion87/32/4666_2.png) [@Therion87](https://discourse.pi-hole.net/u/Therion87)\
**Post date:** [August 13, 2018, 12:02pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/6 "2018-08-13T12:02:59Z")

</div>

Use it's IP address.

Make sure that you client got PiHole address for DNS from the router in DHCP.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [August 13, 2018, 12:09pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/7 "2018-08-13T12:09:28Z")

</div>

On Linux and Mac client PC's, whats outcome for below one ?

`cat /etc/resolv.conf`

Or if its Windows client PC, what does the DNS section display when run below one in a CMD prompt ?

`ipconfig /all`

Like @Therion87 mentions, you want clients to query the Pi-hole IP address directly and not via your router first.

You can test DNS lookups and blocking on a Linux/Mac/Windows client PC with below ones:

`nslookup doubleclick.com`

`nslookup doubleclick.com <PIHOLE_IP_ADDRESS>`

`nslookup doubleclick.com 8.8.8.8`

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 12:21pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/8 "2018-08-13T12:21:44Z")

</div>

A restart of router and Pi solved that issue.

So ASUS routers send a few DNS queries every second to check if an internet connection is active or not... After I changed the WAN DNS from my Pi's IP to 8.8.8.8, 8.8.4.4, I noticed a downward spike in the graphs, but shortly, a spike in queries from localhost:

[https://www.dropbox.com/s/zet59tucm2nxyk9/Screenshot%25202018-08-13%252017.46.29.png?dl=1](https://www.dropbox.com/s/zet59tucm2nxyk9/Screenshot%25202018-08-13%252017.46.29.png?dl=1)

So I'm assuming that any DNS query the router will be making (like NS resolution for ping/traceroute) will be forwarded to the IPs set in WAN DNS settings?

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 12:36pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/9 "2018-08-13T12:36:37Z")

</div>

> [@deHakkelaar](#):
>
> cat /etc/resolv.conf

For `cat /etc/resolv.conf`:

> MacBook-Pro:~ Agneev$ `cat /etc/resolv.conf`
> 
> macOS Notice
> 
> This file is not consulted for DNS hostname resolution, address  
> resolution, or the DNS query routing mechanism used by most  
> processes on this system.
> 
> To view the DNS configuration used by this system, use:  
> scutil --dns
> 
> SEE ALSO  
> dns-sd(1), scutil(8)
> 
> This file is automatically generated.
> 
> domain RT-AC87U  
> nameserver 10.0.0.6  
> nameserver 10.0.0.1

For `nslookup doubleclick.com`:

> MacBook-Pro:~ Agneev$ nslookup doubleclick.com  
> Server: 10.0.0.6  
> Address: 10.0.0.6#53
> 
> Name: doubleclick.com  
> Address: 0.0.0.0

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [August 13, 2018, 12:47pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/10 "2018-08-13T12:47:16Z")

</div>

> [@agneev](#):
>
> MacBook-Pro:~ Agneev$ `cat /etc/resolv.conf`  
> nameserver 10.0.0.6  
> nameserver 10.0.0.1

The Mac has got two DNS servers configured.  
This Mac will sometimes also query the not Pi-holed DNS server 10.0.0.1 resulting in the "pi.hole" name not resolving and ads leaking through.

> [@Why should Pi-hole be my only DNS server?](https://discourse.pi-hole.net/t/why-should-pi-hole-be-my-only-dns-server/3376):
>
> Reduced Ad Blocking Capability The main reason you should Pi-hole as your only DNS server is that you will see increased performance in the blocking of ads. If you have two DNS servers (Pi-hole and something else), your network clients may not always query Pi-hole for name resolution. If a query happens to be answered from a non-Pi-hole DNS server, your block lists will not apply (since that DNS server doesn't know about them). All Queries Need To Go Through Pi-hole First Since other DNS serv…

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 12:55pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/11 "2018-08-13T12:55:53Z")

</div>

Yeah.

> [@Therion87](#):
>
> I now point my WAN DNS to 1.1.1.1, 1.0.0.1, and use the LAN DHCP server to assign my clients the PiHole address for DNS for blocking purposes. This stopped the flood of DNS queries.

As @Therion87 suggested as a workaround, I had to point my WAN DNS towards 8.8.8.8 and 8.8.4.4.

I can change the DNS servers on my Mac to 10.0.0.6 only.  
But what about other devices in the household?; It's not possible to change DNS everywhere.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [August 13, 2018, 1:01pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/12 "2018-08-13T13:01:18Z")

</div>

@Therion87 posted this bit:

> [@Therion87](#):
>
> and use the LAN DHCP server to assign my clients the PiHole address for DNS for blocking purposes.

He probably configured his routers DHCP service to push the Pi-hole IP address to his clients for DNS resolution  
Can you post screenshots of your router's DHCP settings ?  
If settings lacking/missing, you can disable the DHCP service on the router and use Pi-hole's own DHCP service as a replacement:

> [@How do I use Pi-hole's built in DHCP server (and why would I want to)?](https://discourse.pi-hole.net/t/how-do-i-use-pi-holes-built-in-dhcp-server-and-why-would-i-want-to/3026):
>
> Using Your Existing Router For Network-wide Ad Blocking You might not need to use Pi-hole's DHCP server: In many home environments, your router also functions as your DHCP server. In this case, you can often [set Pi-hole to be the DNS server for your network clients in the router's DHCP (or LAN) settings page](https://discourse.pi-hole.net/t/how-do-i-configure-my-devices-to-use-pi-hole-as-their-dns-server/245), which allows all of your network clients to block ads simply by connecting to the network. Setting it up this way is also what makes Pi-hole very powerful for network-wide ad blocking. W…

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 1:04pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/13 "2018-08-13T13:04:51Z")

</div>

> [@deHakkelaar](#):
>
> He probably configured his routers DHCP service to push the Pi-hole IP address to his clients.

So did I.

> [@deHakkelaar](#):
>
> Can you post screenshots of your router’s DHCP settings ?

[https://www.dropbox.com/s/fmc6kh3g3qisked/Screenshot%202018-08-12%2011.30.24.png?dl=1](https://www.dropbox.com/s/fmc6kh3g3qisked/Screenshot%202018-08-12%2011.30.24.png?dl=1)

My WAN DNS currents points to 8.8.8.8 and 8.8.4.4.

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 1:08pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/14 "2018-08-13T13:08:28Z")

</div>

But the thing is that the router advertises it's own server, and there is no way to disable that unless you turn off DHCP. I do not want to use pi hole as my DHCP server.

[https://www.dropbox.com/s/qcjei6tn4mun5ab/Screenshot%202018-08-13%2018.36.36.png?dl=1](https://www.dropbox.com/s/qcjei6tn4mun5ab/Screenshot%202018-08-13%2018.36.36.png?dl=1)

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [August 13, 2018, 1:08pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/15 "2018-08-13T13:08:30Z")

</div>

Aha Asus.  
Read below posting.  
Best bet, disable the DHCP service on the router and enable the one on Pi-hole.

> [@Why are Adverts on Some Domains Not Blocked?](https://discourse.pi-hole.net/t/why-are-adverts-on-some-domains-not-blocked/5972):
>
> Expected Behaviour: Pi-Hole is operating successfully for many web sites. Actual Behaviour: However, I've noticed that some web sites (this one as an example - [Discover your weather | The Bureau of Meteorology](http://www.bom.gov.au/?ref=hdr)) does not have it's advertisements blocked by Pi-Hole. However, if someone clicks on the displayed advertisement, Pi-Hole successfully blocks the advert web site from opening. Do I have something configured incorrectly, or is there something unusual about the way that this web site is…

EDIT: our postings crossed but I believe this is the only option.

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 1:12pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/16 "2018-08-13T13:12:23Z")

</div>

Alright. So if I use pi hole as my DHCP server, how does it deal with guest networks?

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [August 13, 2018, 1:13pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/17 "2018-08-13T13:13:29Z")

</div>

If the router doesnt block DHCP and/or DNS for those network segments, it should work.

EDIT: worst case, you can configure a bridge interface on Pi-hole that has a leg/connection to both networks.

EDIT2: below posting describes a bridge setup.  
Though I made a mistake and the WiFi SSID and password should be configured in the wpa\_supplicant config file.

> [@Cant ssh into pi after reboot with pihole installed](https://discourse.pi-hole.net/t/cant-ssh-into-pi-after-reboot-with-pihole-installed/1708/10):
>
> Darn this gave me some headaches bc they changed things again wink Better put the IP on the bridge interface like below. In "/etc/network/interfaces": allow-hotplug eth0 iface eth0 inet manual allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa\_supplicant/wpa\_supplicant.conf wpa-ssid \<YOUR\_SSID\_NAME\> wpa-psk \<PASSWORD\> auto br0 iface br0 inet manual bridge\_ports eth0 wlan0 In "/etc/dhcpcd.conf": interface eth0 nodhcp nodhcp6 interface wlan0 nodhcp nodhcp6 int…

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 1:19pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/18 "2018-08-13T13:19:34Z")

</div>

What happens to my existing DHCP reservations set in the router, and can I still set reservations in the router's web UI?

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [August 13, 2018, 1:21pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/19 "2018-08-13T13:21:12Z")

</div>

DHCP reservations on the router will be lost.  
The only place to set reservations is on the Pi-hole web GUI.

---

<div class="post-metadata">

**Author:** ![agneev](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@agneev](https://discourse.pi-hole.net/u/agneev)\
**Post date:** [August 13, 2018, 1:22pm UTC](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828/20 "2018-08-13T13:22:49Z")

</div>

Android phones have weird hostnames. Is it possible to change hostnames of devices so it appears properly in the stats dashboard?

[Next page](https://discourse.pi-hole.net/t/too-many-queries-made-when-conditional-forwarding-is-enabled/11828.md?page=2)
