Possible to configure router to use pi-hole as primary DNS but also define a fallback in case pi-hole box is down

Is is possible within the router (for example running tomato-usb) to define the primary DNS as the box running pi-hole but also have a secondary DNS defined in case of downtime with the pi-hole box? I have tried this but it seems that traffic ignores the pi-hole box and goes directly to the secondary DNS I defined.

Example (toastman's tomatoUSB) where 192.168.1.250 is the IP of the box running pi-hole and that IP address is OUTSIDE of the range I defined for DHCP within the router:
Basic>Network>Static DNS

primary DNS = 192.168.1.250
secondary DNS = 8.8.8.8

See here why you can't designate a certain server as primary:

1 Like

Thanks for that, I was under the same impression that secondary was a failback DNS for when the primary DNS was down

FWIW:

I run LEDE on my router and PiHole on a Synology NAS. I set my router as my DHCP server, with the Synology NAS IP listed as the 'first' DNS server in the config file, then the router IP(192.168.1.1) as the 'second'. I seem to always get the PiHole as the DNS server, unless the NAS is down or rebooting, where it then kicks over to the router. Using the dig command always shows the NAS as the DNS server, unless its rebooting/down.

I haven't monitored the router's logs to see if it's resolving DNS requests from clients while the NAS is up, but my gut feeling is that it isn't. I don't have a router flashed with LEDE right now, but once I do I'll see if it is. My experience goes against all the documentation for DNSmasq and PiHole, but you might want to give it a try.

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