cancel
Showing results for 
Search instead for 
Did you mean: 

Can I run 2 Pihole servers on 2 Raspberry Pis?

Dan_the_Van
Hero
Posts: 3,154
Thanks: 1,573
Fixes: 90
Registered: ‎25-06-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@Baldrick1 

Just as I'd expect, many thanks for confirming.

Were you forced to add a secondary DNS server IP? Be interesting if 0.0.0.0 works rather than adding the pi-hole twice.

I have a pi-hole but never implemented it on my LAN, mainly used on my virtual mint OS systems.

 

Baldrick1
Moderator
Moderator
Posts: 12,436
Thanks: 5,601
Fixes: 430
Registered: ‎30-06-2016

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@Dan_the_Van 

The Hub 2 won't accept it:

dns1.png

Moderator and Customer
If this helped - select the Thumb
If it fixed it,  help others - select 'This Fixed My Problem'

Dan_the_Van
Hero
Posts: 3,154
Thanks: 1,573
Fixes: 90
Registered: ‎25-06-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@Baldrick1 

Should I be surprised?  Not really!

Thanks for trying

Baldrick1
Moderator
Moderator
Posts: 12,436
Thanks: 5,601
Fixes: 430
Registered: ‎30-06-2016

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@Dan_the_Van 

It won't allow a blank field either.

Moderator and Customer
If this helped - select the Thumb
If it fixed it,  help others - select 'This Fixed My Problem'

Dan_the_Van
Hero
Posts: 3,154
Thanks: 1,573
Fixes: 90
Registered: ‎25-06-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@glocal 

I have now introduced a second pi-hole DNS server to my local LAN, hardware used pi 2 Model B (original server) and pi zero 2 W 

I have configured via network properties  a Windows, a Raspberry pi 4,Mint OS virtual system, to use both.

Using a basic nslookup command I can see the name resolution by both DNS servers but not necessary alternatively.

HTH

 

 

 

glocal
Rising Star
Posts: 140
Thanks: 11
Registered: ‎11-09-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@Dan_the_Van 

Thanks for that. Did you specify the IPs of the two Pis as primary and secondary DNS IPs in the router? Did you by any chance take one of the Pis out to see if the other one successfully takes over DNS resolution?

Champnet
Aspiring Hero
Posts: 2,905
Thanks: 1,089
Fixes: 15
Registered: ‎25-07-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@Dan_the_Van  I reckon you’ve just created two primary DNS servers. You need to get them supporting each other….

Dan_the_Van
Hero
Posts: 3,154
Thanks: 1,573
Fixes: 90
Registered: ‎25-06-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@glocal 

I used network properties so nothing added to the Hub DHCP settings

 

 

For windows - ipconfig -all
DNS Servers . . . . . . . . . . . : 192.168.10.200
                                    192.168.10.205
For pi OS - nmcli device show eth0 | grep IP4.DNS
IP4.DNS[1]:                             192.168.10.200
IP4.DNS[2]:                             192.168.10.205

 

 

EDIT: I did fail the .200 device with no lose of service.

@Champnet 

It was just a quick test this morning, I was going to look further into this later today, currently I'm melting!

EDIT: some research provides this link https://github.com/vmstan/gravity-sync 

Not sure if I will try this on the two pi-hole systems I have as one is a wireguard VPN server with network share, I would like to avoid trashing it if possible.

 

 

 

glocal
Rising Star
Posts: 140
Thanks: 11
Registered: ‎11-09-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@Dan_the_Van I don't see much benefit in actively keeping the two Pihole setups synchronised really -- and one of my Pis is a Wireguard VPN server too. Gravity Sync's FAQ makes some interesting points about redundancy, including:

In some cases people intentionally set those public resolvers as a backup entry in DHCP, thinking it'll only be used if Pi-hole isn't available, which is not the case.

 

And if we want to complicate things to do this properly and save millisecs, there is apparently the High Availability approach with keepalived here (part 2 in this old tutorial).

Dan_the_Van
Hero
Posts: 3,154
Thanks: 1,573
Fixes: 90
Registered: ‎25-06-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@glocal 

After backing up the pi-hole system I built a second pi-hole, then installed gravity sync on the two pi-hole. All went smoothly.

However I have come to the conclusion that for me there really is no need to a secondary pi-hole system and in the event of failure I would switch over to public DNS system and rebuild a replacement system.

 

 

 

Champnet
Aspiring Hero
Posts: 2,905
Thanks: 1,089
Fixes: 15
Registered: ‎25-07-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@Dan_the_Van  Is this a must-have-a-go-at personal project or do you have a problem with the public DNS servers ?

Dan_the_Van
Hero
Posts: 3,154
Thanks: 1,573
Fixes: 90
Registered: ‎25-06-2007

Re: Can I run 2 Pihole servers on 2 Raspberry Pis?

@Champnet 

No problems with DNS of any flavour, I mainly use the plusnet ones.

The pi-hole is an old 5 +year project, the OP question got me thinking, so it's a must-have-a-go project. A sort of continuation of what I did before I retired early testing and supporting market data products globally.