Guys, I have an Adguard instance in my lan, and some of my static leases use it via dhcp option. Any chance to make some failover when Adguard instance in offline?
For example:
if 192.168.0.20 (it’s Adguard ip) in offline for 1 minute, remove dhcp option field from list of specified leases;
if Adguard instance is back online, then set dhcp option to ‘adguard’ for list of specified leases;
I just understand, that I can add second ‘option 6’ to dhcp options, for example my adguard 192.168.0.20 and second cloudflare 1.1.1.1, and add second option to my specified ips, if my adguard will be offline, second option can be working at this moment, as I underdstand. Need to test it, maybe my question about script can small blood is resolved.
Wow, interesting, I didn’t think in this direction, can u please explain more about your rule? As I understood, your NAT rule is simple redirected from 8.8.8.8 (for specified leases also) to your pi-hole instance right? Can u share your rule?
So, your all clients routed to Google or Pi-Hole right? Interesting if in my case I provide ony for some leases my Adguard, I think they need to add to some ip list, and in NAT rule I need to redirected only for this ip addresses list route from my adguard address if it is offline to for example Google or Cloudflare.
There are scripts around the forum, do a search for them.
BUT, if you only want to change the DNS IP served to clients via DHCP that might not be ideal, because you can’t have such short lease times and not cause wierd problems with some clients.
You could keep adguard on another subnet so the clients have to pass through the router in order to reach it and if it’s for some reason down, hijack it’s traffic and send it via a failover.