Can the Pi-Hole DHCP send out a second DNS server address to clients?


Hi. While I am playing around, learning and sometimes breaking stuff, I have set up a second pihole as a backup/ secondary dns.

Is there a way to configure the main pihole running the dhcp server to broadcast the address of the secondary’s ip address?




I was having problems with running PiHole in Docker (it keeps going unresponsive for long stretches), so I went and bought an actual Raspberry Pi and set that up as my ‘primary’ DNS and DHCP server. I am still running the Docker instance as secondary, and it does seem to work fine. The DHCP server can’t give out both addresses, but I have some devices configured with both. Its not ideal but it works.

Now if only I can get the whitelist to work…


Cheers all. I think 80% of the time mine dies is because i’m playing with it to try do something.

Maybe I’m better off trying to work out how to clone the SD Card 1:1 and that way as long as its not hardware I can just bang in the cloned card. I’ll have to investigate howto clone, unless someone here as a way they can point me to?


The copy SD card program on the Pi’s menu?

If you run one Pi for DHCP and DNS and a second for DNS only, if one fails the other will pick up the DNS load from it. DHCP is much more forgiving in the need for quick replies so you should have more than enough time to repair the DHCP serving Pi before you have major problems.


Borrowed from a reddit post and this worked perfectly for me reddit post


sudo nano /etc/dnsmasq.d/03-pihole-dhcp-DNS.conf

(and paste)

#PiHole DNS server IP’s
dhcp-option=6, 192.168.1.X, 192.168.1.Y

(change ip’s to your pi-holes)


sudo reboot

All devices now get a secondary DNS server when they next poll the DHCP server or you force a new lease :+1: also this file doesn’t get overwritten on a reboot or update change.