Can I create a virtual IP for two internal DNS services? 24.10 business edition

Started by gctwnl, April 20, 2025, 08:48:50 PM

Previous topic - Next topic
I have two internal DNS resolvers running on two different servers (different OS too). I currently give the IP addresses of both to the clients via DHCP, so each client gets two IP addresses to use as resolver (e.g. 192.168.1.5 and 192.168.1.6). But when one of these servers dies, the clients tend to remain stuck on that server for their DNS needs, and thus a lot of stuff starts failing. In general, it seems my clients (mostly Apple) don't really react to one of the DNS resolvers being unavailable, or at least not quickly.

I would like to add a virtual IP-address to OPNsense (e.g. 192.168.1.53) that passes traffic on to either 192.168.1.5 or 192.168.1.6, specifically UDP on port 53 of course, depending on availability. Is that possible and if so, how? I am running 24.10 business edition.

You can install a TCP/UDP Reverse Proxy and configure it as load balancer for your servers.
It detects the availability of the backend servers by its own health checks then and forwards the requests to the server, which is up and running.

You can simply provision .5 and .6 in the DHCP scope DNS configuration and achieve the same result without other complications.