I don’t think this accomplishes what he wants. The router DHCP will assign the second DNS address as you mention, but the devices will select one at random, not as a backup/failover. So what happens is that devices sometimes go through the Pi-hole and sometimes go through the secondary DNS address and receive ads. The only real way I’m aware of is to have a second pi-hole for redundancy. Personally, I decided to use a cloud based service (NextDNS) for this exact reason. I didn’t want my families internet to rely on devices that I host.
Comment on When Pi-hole is down?
HybridSarcasm@lemmy.world 11 months ago
Add another DNS server (1.1.1.1, for instance) to your DHCP options. Your DHCP clients will use 1.1.1.1 when the pi-hole isn’t responsive.
hi_its_me@lemmy.world 11 months ago
magikmw@lemm.ee 11 months ago
I think it depends. In my limited experience, because I have not tested this thoroughly, most systems pick the first DNS adresses and only send requests to the second if first doesn’t respond.
This has lead at least a couple of times to extremely long timeouts making me think the system is unresponsive, especially with things like kerberos ssh login and such.
I personally set up my DHCP to provide pihole as primary, and my off site IPA master as secondary (so I still have internal split brain DNS working in case the entire VM host goes down).
Now I kinda want to test if that offsite DNS gets any requests in normal use. Maybe would explain some ad leaks on twitch.tv (likely twitch just using the same hosts for video and ads, but who knows).
CurbsTickle@lemmy.world 11 months ago
It is entirely the case.
DNS queries will go to all on the list, and use whatever responds first.
If you are seeing occasional ad leaks, this is why.
AtariDump@lemmy.world 11 months ago
The ONLY DNS server you should have set on your network is a/the PiHole(s).
machinin@lemmy.world 11 months ago
How many queries a month do you have? I’m at 15 days and I’m already at 750K. Do you pay for your service? I can do that, just curious what is common.
BearOfaTime@lemm.ee 11 months ago
I’m at 30k ×blocked* per day, over 100k queries per day.
This on a small 2 user network, with a handful of machines, but a fucking Samsung TV. That goddamn thing constantly pings all sorts of shit.
If I really restrict it (breaking some stuff on the TV), I can get to 35% of queries blocked per day, mostly from it.
Though nominal blocking kills the ads on the menu system, pretty well, making it much more responsive.
hi_its_me@lemmy.world 11 months ago
I’m not exactly sure how many queries, but it’s above the free limit. I purchased the pro plan. For $20 a year it’s been a great service for me. I can send a referral code for 30% off (I think). I think adguard has a similar service.
1984@lemmy.today 11 months ago
Yeah this is the next best option, but a secondary pihole is the best, so you still get the dns blocking while the first one is down.
AtariDump@lemmy.world 11 months ago
The ONLY DNS server you should have set on your network is a/the PiHole(s).
1984@lemmy.today 11 months ago
Didn’t know that, thanks for clarification!
Then I suggest two piholes. :)
rambos@lemm.ee 11 months ago
Wait, but then you cant tell if your device will use pihole even if its up. Afaik primary/secondary dns is not used in that order. I think best way is to set up 2nd pihole
Rooki@lemmy.world 11 months ago
Does it really do that? I thought if pi-hole blocks it, it just says nothing here, normally a pc then looks up your secondary dns and then ads are back at it.
This was my experience when i did that.
HybridSarcasm@lemmy.world 11 months ago
Yes, your experience will be different if your DNS is being provided by another kind of DNS resolver. If you want a consistent pi-hole experience (and you can avoid downtime of your current pi-hole), add another pi-hole to your network and let that be your secondary DNS resolver.
taladar@sh.itjust.works 11 months ago
No, that is not how DNS blocking works. It doesn’t just avoid responding, it responds but with a response that says that the domain does not exist or one that points to a different IP address.
AtariDump@lemmy.world 11 months ago
The ONLY DNS server you should have set on your network is a/the PiHole(s).
HybridSarcasm@lemmy.world 11 months ago
Except when the ONLY pi-hole is down, which was the original OP’s whole question.
atzanteol@sh.itjust.works 11 months ago
They will also use 1.1.1.1 whenever they want. The order is not guaranteed.
Hosts also tend to use the same one for some time, so if your pihole went down clients may still favor 1.1.1.1 even after it comes back up.