Picking preferred DNS server
Posted: Sat Nov 27, 2021 6:50 am
I have set up a Pi-hole DNS and I am quite satisfied with it. My Mikrotik router (hEXr3) is configure to use peer DNS from my ISP, which I find useful for redundancy. While the Pi-hole is online, everything works as expected, DNS is routed via the Pi-hole and no ads are showing. However, if the Pi-hole temporarily loses connectivity (e.g. is rebooted), another DNS server is picked by the hEXr3 (from the dynamic servers) and the Pi-hole functionality is lost / circumvented.
I know that one solution would be to leave the Pi-hole as the sole DNS server on the network. However, my goal is to have redundant servers to fall back to. Is there an elegant way to pick the preferred DNS server which is used whenever it is on line, with automatic fallback in case of outage (and return to the preferred DNS as soon as it gets back on line)? I tried Tools / Netwatch, but the attempt was not successful.
Any ideas how to keep the preferred DNS while online (and have ample fallback solutions) would be appreciated.
I know that one solution would be to leave the Pi-hole as the sole DNS server on the network. However, my goal is to have redundant servers to fall back to. Is there an elegant way to pick the preferred DNS server which is used whenever it is on line, with automatic fallback in case of outage (and return to the preferred DNS as soon as it gets back on line)? I tried Tools / Netwatch, but the attempt was not successful.
Any ideas how to keep the preferred DNS while online (and have ample fallback solutions) would be appreciated.