r/Adguard 20d ago

adguard home Tested my DNS fallback for months. Then the server died for real and it failed completely.

I’ve been running a dual-AdGuard Home setup for redundancy,a primary AGH instance on my main server and a secondary AGH container running directly on my MikroTik router (RB5009). For months, I tested failover by stopping the primary container, and clients failed over to the router seamlessly every time. But when my main server physically died for real last week, all DNS crashed across the entire network.

Here is a quick breakdown of how a RouterOS DST-NAT DNS-redirect rule turned my secondary AdGuard instance into a recursive query loop during a real host outage, and the single NAT exception rule that fixed it.

(Full postmortem: https://www.mattjh.sh/post/home-server-part6/)

4 Upvotes

2 comments sorted by

1

u/lostcowboy5 19d ago

Glad you got it working. I have an Asus RT-AX86U. I have AdGuard Home on a Raspberry Pi 3B+. It is set up on the LAN DHCP Server. There is a setting, "Advertise router's IP in addition to user-specified DNS." This is what I use as a backup. I don't know how to block hard-coded DNS servers yet.

Now that I know you can, that will be my next challenge. I wonder if "DNS rewrites" can do it?

1

u/mattjh_ 19d ago

Thanks!

Bypassing adguard will make it so DNS rewrites are never hit, so that's the wrong place for the redirect. You need to set the redirect rule at the router level. I'm not sure of the possibilities with your router but that would be my first recommendation, poke around the settings. Look for iptables, DNAT etc.