Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
OP already said that their current DHCP solution (the router) can't push multiple DNS servers. Having a good secondary can be really helpful for things like power blips, maintenance windows, and cats pulling power cables. There are a few solutions that also do ad blocking that can make good secondaries
I don’t think anyone is arguing against dual DNS servers. The distinction being made is that a second DNS server is not a fallback. Most newbies think “secondary” means it will only be used when the primary is unavailable. That’s not true. A client is just as likely to use a secondary DNS as a primary. If only one DNS uses pihole, then the secondary will serve ads because it’s just calling the upstream DNS resolver.
Personally, I accomplished what OP is talking about with two rPis. First serves DCHP from 192.168.1.10 to .100, second serves .101 to .250. I send the two piholes as primary and secondary DNS. I also use Unbound as the upstream, but that is just personal preference.
Depending on the client, it can be. The Microsoft page pretty cleanly defines expected dns client behavior [https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/dns-client-resolution-timeouts#what-is-the-default-behavior-of-a-windows-7-or-windows-8-dns-client-when-two-dns-servers-are-configured-on-the-nic](Microsoft learn). There haven't been any published changes to this that I've seen, and it more or less matches my experience. Linux is a lawless land in this respect, but it really boils down to "it might", so caveat emptor there. That's also why I suggested a public ad blocking dns server as a secondary, in case multicast dns does its multicast dns thing
I was just saying that there can be a lot of good reasons for downtime. Heck, I use a secondary in my network because sometimes my unraid host starts dnsmasq and it clobbers my adguard container
Unless, of course, the second DNS server is a second pi-hole ;p
You'd only get ads while the secondary server is active plus the expiry. Not a problem while the pihole is online.
DNS clients only try the secondary resolver if the primary one times out or returns SERVFAIL. If it returns NXDOMAIN or incorrect records there's no communication with the second DNS server.
Thanks. Usually, it does not go down. It is running for years without any problems, just minor downtimes due to update related reboots. But today the pi just wasn't reachable anymore. No connection to the router, so not reachable via ssh or anything, had to be rebooted. So I started wondering about a fallback plan.