Bypass Pi-hole for certain clients using built in DHCP and static reservation.

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

Expected Behaviour:

Pi-hole to pass google DNS server to machine with static ip reservation to bypass Pi-hole.

Actual Behaviour:

Can either get Pi-hole to pass google DNS to machine but it will allocate a random IP from my DHCP pool, or it can assign the correct static IP from the reservation but fails to pass google DNS and uses Pi-hole for DNS resolution.

Debug Token:

Sorry, not got access to it at the moment.

Please note, this is similar to this thread Bypassing / Excluding IP address from Pi-Hole not working but that thread was closed before a resolution was added.

So basically, by using the 04-bypass.conf from this thread Things you can do with dnsmasq! I was able to send a client the google DNS server via the pi-hole’s built in DHCP. When it does this however, it fails to use the status reservation that I had earlier specified in the web settings. If I remove the entry from the 04-bypass.conf and restart the pihole-FTL service, then it will again correctly allocate the static reservation.

It seems I can do either a dns bypass, or a static reservation but not both?

Has anyone got the two working together or are they just mutually exclusive?

I know I can use another DHCP server somewhere and split them up that way, but i’m ideally trying to get them working on the same system.

I have done this previously on an Open-WRT based system using dnsmasq so I know it can be done, i’m just unsure if it can be done using pi-hole.


Pi-Hole uses dnsmasq, so the methods should be identical.

As I have written a reply to Bypassing / Excluding IP address from Pi-Hole not working, I can confirm that a working solution can be achieved.

You have two options:
Option 1
Assign a static IP through Pi-hole’s Admin panel and manipulate Pi-hole’s own /etc/dnsmasq.d/04-pihole-static-dhcp.conf in the way that 04-bypass.conf suggests, but without creating a separate file.
This is the variant I tried myself, and it comes with all the caveats I’ve described in my older reply (especially manglig the UI), so you want to re-read that.

Option 2
Leave Pi-hole’s Admin panel alone - if you have already defined static IPs before, this might involve releasing and removing each static IP device that you want to bypass Pi-hole.
Then supply a slightly altered 04-bypass.conf that complies with the following structure:

# use Google DNS
# devices to use Google DNS

This might circumvent some of the problems with Option1, but I haven’t tried it.

Let us know which option worked for you :wink:

1 Like

Hi @Bucking_Horn,

Thanks for the information in both your original thread, and this one. I have tried option one as you mentioned, and also variations on option 2 but neither seem to work in my situation. In fact they cause the pihole to not give out any DHCP at all after I have restarted the service so I think I have some sort of syntax issue going on. However, its not that important as I was simply seeing if it was possible or not.

I will just wait and see if a future release allows me to bypass the clients in the way I require, I will go back to my OpenWRT based system and use this to point the clients I want to filter to pihole, and the others to allow straight out to googles DNS using its version of dnsmasq (its config files are also different to native dnsmasq, as it recompiles them on the fly from its interface … its a strange situation, hence why I could not just use the same settings in pihole that I have got working under OpenWRT as @jfb mentioned.).

Thanks both for all your help.

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