Local DNS on Pihole
from GeekyOnion@lemmy.world to selfhosted@lemmy.world on 11 Nov 22:20
https://lemmy.world/post/38670664

How are folks syncing local DNS records across multiple Piholes?

#selfhosted

threaded - newest

etchinghillside@reddthat.com on 11 Nov 22:22 next collapse

Multiple Piholes?

GeekyOnion@lemmy.world on 11 Nov 22:29 collapse

<img alt="" src="https://lemmy.world/pictrs/image/0f778169-8d7f-4503-98b3-6576dbcec378.png"> I have a “main” Pihole on a Raspberry Pi, and I set up another instance in a VM for secondary functions.

ryokimball@infosec.pub on 11 Nov 22:43 next collapse

Can you just point the second to the first?

GeekyOnion@lemmy.world on 11 Nov 23:04 collapse

Huh. Good tip! I’ll have to test this out.

TheRagingGeek@lemmy.world on 12 Nov 07:04 next collapse

I have this same setup, current strategy is I have automation in my n8n where I can fill in a form and if submits the dns addition to both piholes via api. I am considering alternatives but has worked alright for now

[deleted] on 12 Nov 16:30 collapse
.
ilillilillilillililli@lemmy.world on 11 Nov 22:45 next collapse

I just run teleporter on my primary and manually upload that backup to my secondary. My blocklists and local DNS dont change much, so its not a big concern of mine.

Nebula-Sync and Orbital-Sync may be of interest to you. It seems like you want to automate the syncing.

GeekyOnion@lemmy.world on 11 Nov 23:05 collapse

Thanks! I’ll take a look at those!

oxfordcoma@lemmy.world on 11 Nov 23:14 next collapse

I run unbound alongside pihole for extra privacy and I keep my unbound config in git. I have gitea set up to push out new unbound configs every time there’s a git push.

GeekyOnion@lemmy.world on 11 Nov 23:25 collapse

That’s a great idea! Thanks! I’ve got unbound running locally on one instance of Pihole, and I’ve got it in a LXC for the other instance. Using the configs to pull from git would make that much easier to sync.

modus@lemmy.world on 12 Nov 00:32 next collapse

Why do you have more than one? Is this for an enterprise-level situation?

talentedkiwi@sh.itjust.works on 12 Nov 01:06 next collapse

I’ve found that if I set primary as pihole and secondary as, say 1.1.1.1. then, my android phone will pick either one seemingly randomly. So my local DNS doesn’t work.

My workaround was to do two pihole. I forget how I sync them though.

modus@lemmy.world on 12 Nov 01:14 collapse

I see. I set my router’s DNSs to pihole for the first and then one of adguard’s public IPs for the second.

4am@lemmy.zip on 12 Nov 03:21 next collapse

So the whole house doesn’t go down and/or need to be reconfigured to do an update

modus@lemmy.world on 12 Nov 03:47 collapse

Pfft… Redundancy… Over-rated. ;)

DaGeek247@fedia.io on 12 Nov 04:53 next collapse

My dns config options always have at least two spots. Obviously, this means I need two piholes to fill them both up.

More seriously, it has actually saved my network from going down a couple times already.

GeekyOnion@lemmy.world on 12 Nov 16:24 collapse

Just a home lab for fun and experimenting.

stratself@lemdro.id on 12 Nov 03:27 next collapse

Pihole runs on dnsmasq right? Maybe you could create a cronjob to copy the underlying dnsmasq.conf to other Piholes

GeekyOnion@lemmy.world on 12 Nov 16:23 collapse

Excellent suggestion! Thank you!

WASTECH@lemmy.world on 12 Nov 03:43 collapse

There is an iOS/macOS app called “Pi-hole Remote” that can manage multiple PiHole instances at once. I use that because it will make changes on both instances at once for me.

Other than that, I log in to each device and copy paste.

GeekyOnion@lemmy.world on 12 Nov 16:23 collapse

Thanks! I didn’t even think about running a local app, but this may be a fun find to experiment with!