Conditional 2nd DNS server
Posted: Mon Jan 23, 2023 3:59 pm
Hi,
I run pihole as my DNS server. In the router (running Gargoyle 1.12.0) I have the IP of my pihole server as first DNS.
Because occasionally pihole crashes (once a month, and always when I'm not around to fix things) I have 1.1.1.1 (CloudFlare) listed in the router as my 2nd DNS server.
This 2nd DNS server should however ideally ONLY be used when the first one FAILS, as in: the server is unreachable.
It seems however that the router either randomly distributes DNS queries to either one of the two DNS servers, or it refers to the 2nd one if the 1st one comes back with "I don't know that one". I am not sure which of the two cases is in fact happening.
The annoying thing is that I have, for good reason, a number of blacklisted entries in my pihole server, I don't want those blacklisted addresses to be resolved just because the router decides to give a query to the 2nd DNS server. I would like to ONLY allow the 2nd DNS server to be used when the first one really fails, as the alternative - no DNS server at all - would be worse.
So can somebody please explain to me if/how it is possible to get the desired outcome: ONLY use 2nd listed DNS server if 1st one is actually offline (NOT when it simply reports "I don't know that address").
Thanks!
I run pihole as my DNS server. In the router (running Gargoyle 1.12.0) I have the IP of my pihole server as first DNS.
Because occasionally pihole crashes (once a month, and always when I'm not around to fix things) I have 1.1.1.1 (CloudFlare) listed in the router as my 2nd DNS server.
This 2nd DNS server should however ideally ONLY be used when the first one FAILS, as in: the server is unreachable.
It seems however that the router either randomly distributes DNS queries to either one of the two DNS servers, or it refers to the 2nd one if the 1st one comes back with "I don't know that one". I am not sure which of the two cases is in fact happening.
The annoying thing is that I have, for good reason, a number of blacklisted entries in my pihole server, I don't want those blacklisted addresses to be resolved just because the router decides to give a query to the 2nd DNS server. I would like to ONLY allow the 2nd DNS server to be used when the first one really fails, as the alternative - no DNS server at all - would be worse.
So can somebody please explain to me if/how it is possible to get the desired outcome: ONLY use 2nd listed DNS server if 1st one is actually offline (NOT when it simply reports "I don't know that address").
Thanks!