I'd like to specify primary and secondary DNS servers to be handed out via pihole DHCP server web GUI. This screen is Settings > DHCP (tab)
My router can't specify client DNS server/s, so I turned it off and used pihole's DHCP. I run two piholes on my network for redundancy (one hardware, one docker). I'd like to be able to specify both of them for DNS1 and DNS2 to be handed out to clients.
I was able to cobble together a specific entry for a second DNS server from this thread
The meat and potatoes:
sudo nano /etc/dnsmasq.d/02-pihole-dhcp.conf
dhcp-option=6,Pi-holeIP,SecondaryDNSIP
sudo service pihole-FTL restart
mrdrew, Did you read the first lines of the file you edited?
###############################################################################
# DHCP SERVER CONFIG FILE AUTOMATICALLY POPULATED BY PI-HOLE WEB INTERFACE. #
# ANY CHANGES MADE TO THIS FILE WILL BE LOST ON CHANGE #
###############################################################################
To persist after a pihole upgrade you probably need to enter that dhcp-option line in a separate file you create such as /etc/dnsmasq.d/99-my-settings.conf
Well that’s awesome! The edit I had made was done in that file like the instructions said. But if I can make a little change and they’ll persist!?! I’ll try that next. Thanks!