Hy everyone, I have a PiHole instance running on my home server, and I changed my router (Fritz box) DNS in order to use my PiHole. Everything runs great.

I was wondering if I can put another DNS provider on my “alternative DNS server” in my router, in order to have a fallback alternative in case my server is down, or if I should avoid it.

I’m asking this because I don’t know if the request will be handled in parallel between the two DNS provider (that would make my PiHole useless) or not. Thank you.

@nul9o9@lemmy.world
link
fedilink
English
210M

I’ve set my secondary DNS to cloudflare, and my pihole still blocked ads for me. I assumed the secondary DNS server is used only if the primary can’t be pinged. But i haven’t actually looked into it.

@mateomaui@reddthat.com
link
fedilink
English
510M

I have two piholes, and sometimes both will receive requests at the same time, if there’s a lot of traffic.

Yeah this is what I do.

Putting Cloudflare as my secondary would allow some requests to get through and then often the device whose requests went to Cloudflare would continue using Cloudflare for a while.

The best solution I found was to run a second Pihole and use it as the secondary.

You can use something like orbital sync to keep them syncronized

@mateomaui@reddthat.com
link
fedilink
English
2
edit-2
10M

Pretty much. Not sure how the router determines which DNS to use, but mine seems to latch onto whichever one serves up results the fastest, which would inevitably be cloudflare direct after the pihole returns enough blocks.

So I use a Raspberry Pi Zero W as a dedicated pihole, and my Pi 4 seedbox acts as its own pihole and as a redundant backup. Then use gravity-sync from the Zero to the 4 to mirror the settings.

𝕽𝖔𝖔𝖙𝖎𝖊𝖘𝖙
link
fedilink
English
3
edit-2
10M

Another cool trick is using tailscale to ensure your portable devices always can access your Pihole(s) from anywhere and then setting those server’s tailscale addresses as your DNS servers in tailscale.

This way you can always use your DNS from anywhere, even on cell data or on public networks

I keep a third instance of Pihole running on a VPS and use it as the first DNS server in tailscale so it will resolve a bit faster than my local DNS servers when I’m away from home

@mateomaui@reddthat.com
link
fedilink
English
110M

Huh, I’ll definitely look into that. Both times I tried to route external pihole access, somehow other mystery services found it and it slowed to a crawl from getting absolutely pounded by requests not from me. Thanks for that tip!

@rambos@lemm.ee
link
fedilink
English
310M

Afaik there is no primary and secondary, you cant tell which one to use. Its best to have 2 piholes, but having 2nd DNS set to nextdns or something like that should be fine if you cant run 2 instances, probably not the best setup tho

Create a post

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:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. 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.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 127 users / day
  • 422 users / week
  • 1.16K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.68K Posts
  • 74.2K Comments
  • Modlog