3 ms·
CF and G public resolvers use Anycast, so not everyone will see it down. A work around would be to use a recursive caching server to forward requests upstream
by LinuxBender 8y ago
CF and G public resolvers use Anycast, so not everyone will see it down.
A work around would be to use a recursive caching server to forward requests upstream to multiple IP's and let it track which one is down. Unbound DNS is really good for this. You could set forwarders to 1.1.1.1, 1.0.0.1, 8.8.8.8 and 8.8.4.4 and it will track which ones are up.
An example configuration in Unbound DNS would look like this:
forward-zone:
name: "."
forward-addr: 1.1.1.1 # CloudFlare
forward-addr: 1.0.0.1 # CloudFlare
forward-addr: 8.8.8.8 # Google
forward-addr: 8.8.4.4 # Google
forward-addr: 208.67.222.222 # OpenDNS
forward-first: no
And you can view it's status with unbound-control:
unbound-control dump_infra | grep 1\.1\.1
1.1.1.1 . ttl 1745 ping 0 var 71 rtt 284 rto 284 tA 0 tAAAA 0 tother 0 ednsknown 1 edns 0 delay 0 lame dnssec 0 rec 0 A 0 other 0
This method of caching can also slightly improve the privacy of the people using your network. You get the bonus of a local low latency cache, and requests are distributed among multiple destinations, slightly reducing the marketing benefits of running those public DNS servers.