← LAB NOTEBOOK · REPORT LN-2611-07 · FINDING · DNS · ● VERIFIED

Your DNS failover health check may never have run

A defined-but-unattached check means the virtual address only moves when a whole server dies.

RESULT

The address failed over only when a whole server went down. With the check attached, a crashed DNS service now moves it in about four seconds.

A smoke detector with no battery looks exactly like one with a battery. It sits on the ceiling, it’s the right shape, and it gives you the same warm feeling. You only find out the difference when you press the button.

My lab’s DNS failover turned out to be the one without the battery.

What I thought I had

Two filtering DNS servers share one virtual address using VRRP. Clients only know the virtual address. One server is primary. If it fails, the other one takes the address over, and nobody notices anything.

I’d even tested it. Every time I rebooted the primary, the address moved to the backup, right on cue. Green ticks all round.

What I actually had

A reboot takes the whole server away. Of course the address moves; there’s nobody left to hold it. The case that actually matters is the DNS service crashing while the server stays up and keeps answering VRRP like nothing’s wrong. That one, I’d never tested.

When I finally read keepalived’s log properly, it had been telling me all along:

Keepalived_vrrp: Warning - script chk_dns is not used

The health-check script was defined, but nothing referenced it. Without a track_script block inside the instance, keepalived never runs it. So the check that was supposed to move the address had been switched off since the day it was set up. Patiently. Politely. In the logs.

A check that doesn’t need the internet

There was a second problem waiting behind the first. The original check looked up a public website. If I’d simply attached it, an internet outage would have failed it on both servers at once, and nobody would hold the address. My redundancy would have turned an internet outage into a DNS outage as well.

So I check local behaviour instead:

dig @127.0.0.1 nas.example.internal +short | grep -qx '192.0.2.20' \
  && dig @127.0.0.1 ads.example.com +short | grep -qx '0.0.0.0'

It must answer a local record and block a known ad domain. That catches a crashed service and an empty blocklist. A failing check lowers the server’s priority instead of dropping it out entirely, so if both servers fail at once, one of them still answers.

The test I should have run first

I stopped the DNS service on the primary for 13 seconds and left the server running. The address moved to the backup in about four seconds, and moved back cleanly when the service came back.

I found it by reading logs and testing on purpose, not by living through the outage, which is the only way I want to find these things.

What I’d do differently

Test the failure you’re designing for, not the one that’s easy to cause. Stopping the service took ten seconds and would have found this a year earlier. (The full two-server setup, including the clients that turned out to be bypassing the shared address, is in Two Pi-holes with failover that actually works.)

Press the test button. It’s right there.

Names and addresses are placeholders · first published November 2026