Can I run 2 Pihole servers on 2 Raspberry Pis?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- My Router
- :
- Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
Can I run 2 Pihole servers on 2 Raspberry Pis?
23-06-2024 4:24 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Is there a way to use two separate Raspberry Pis running pihole concurrently?
I have been using one 24/7 on Hub One and Two since August 2020 following this advice to solve the problem of these routers not allowing us to change the DNS server address. It runs Unbound and I have had no issues but I thought some redundancy would be good in case that Pi fails one day. A second Pi would run backup Pihole and PiVPN servers in addition to whatever else I decide not to install on the first one. I am guessing that normally I would define a primary and a fall-back secondary DNS server on the router, but my concern is these routers don't allow that. Any ideas?
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
23-06-2024 4:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Unlike the Hub One the Hub two does allow you to add your preferred choice of DNS servers
Navigate from Home >Advanced settings >My Network >IPv4 configuration >DNS servers >change from auto
Use this to enable custom Primary and Secondary DNS Servers being leased via DHCP.
All clients will need to renew its DHCP lease for changes to take effect.
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
23-06-2024 5:15 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
That's great. I didn't see the options because the DHCP server on my router was disabled. Thanks.
Has anyone used primary/secondary DNS addresses there for two Raspberry Pis?
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
23-06-2024 6:12 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@glocal wrote:
….Iam guessing that normally I would define a primary and a fall-back secondary DNS server on the router, but my concern is these routers don't allow that. Any ideas?
I only run a single pi hole but my observation: I have read that the secondary DNS server is more than a fall back port and the two can interlace and share the load. I found that mine did not play nicely unless I pointed both primary and secondary ports to the pi hole IP address.
Moderator and Customer
If this helped - select the Thumb
If it fixed it, help others - select 'This Fixed My Problem'
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
23-06-2024 6:39 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@Baldrick1 wrote:
I found that mine did not play nicely unless I pointed both primary and secondary ports to the pi hole IP address.
Aren't you creating an unnecessary single point of failure ?
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
23-06-2024 9:59 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Probably not in the way that you are thinking.
The actual upstream DNS lookup is passed from the hub to the pi hole IP address where up to four resolver IP addresses can be specified.
Moderator and Customer
If this helped - select the Thumb
If it fixed it, help others - select 'This Fixed My Problem'
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
23-06-2024 11:18 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I suppose interlacing may mean that when one of the Pis is down, a second one works as fall-back, which would be good for redundancy if that setup played nicely.
Out of interest, with a single Pi setup, what address did the secondary DNS point to before you used the pihole address for both secondary and primary DNS?
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
24-06-2024 7:56 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
No, I mean that it uses the two alternatively not the secondary as a back up for the first. Without the pi hole you either leave the hub to use a pair of Plusnet DNS servers or manually set the DNS addresses to the primary and secondary servers of your choice.
When this function is transferred to the pi hole then this is where you enter this two IP addresses, plus two more if you so wish.
The way to check this out without a Pi hole is to simply set the Hub 2 to use your own choice of IP address, then only enter one, leaving the other entry field blank. This would simiulate one of the suggested two pi holes failing.
Moderator and Customer
If this helped - select the Thumb
If it fixed it, help others - select 'This Fixed My Problem'
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
24-06-2024 8:30 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
When this function is transferred to the pi hole then this is where you enter this two IP addresses, plus two more if you so wish.
What IP Addresses are you referring to, where are the two more if you so wish?
The way to check this out without a Pi hole is to simply set the Hub 2 to use your own choice of IP address, then only enter one, leaving the other entry field blank. This would simiulate one of the suggested two pi holes failing.
The best way to check failover is to fail something not reconfigure a device. So with two pi-hole switch one of them OFF.
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
24-06-2024 10:49 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
What IP Addresses are you referring to, where are the two more if you so wish?
I was referring to the IP addresses of the chosen DNS servers. I obviously failed to remember that the four is made up of two IPv4 and two IPv6 addresses.
The best way to check failover is to fail something not reconfigure a device. So with two pi-hole switch one of them OFF.
It obviously is, but the purpose was to question whether it is worth configuring two pi holes in case that it does not really enhance the availability of a DNS resolver. I would assume that due to the reduced complexity and running temperature of a pi hole, they are inherently more reliable than a router.
Thinking back as to why I ended up with pointing both hub IP addresses to the pi hole: originally I assumed, like others, that the primary IP address would be normally used and the secondary only brought into service if the primary was down or overloaded. With this in mind I directed the hub primary DNS to the pi hole and the secondary to OpenDNS, assuming that it would be very rarely used. When I started playing with seeing how well blocking was working I got inconsistent results, suggesting that quite a lot of traffic was being directed through the secondary DNS channel. I fully accept that this could of been a false impression and I was being fooled by, for example, previously cached results and I welcome further feedback.
What we don't know is how the Plusnet hub steers the DNS requests to the primary and secondary servers. Does it in standard form direct every request initially to it''s primary server, or does it share the load? If one of the two is down then what happens, for example, does it just slow down the response?
Moderator and Customer
If this helped - select the Thumb
If it fixed it, help others - select 'This Fixed My Problem'
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
24-06-2024 11:12 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@Baldrick1 wrote:
What we don't know is how the Plusnet hub steers the DNS requests to the primary and secondary servers. Does it in standard form direct every request initially to it''s primary server, or does it share the load?
Or the other possibility is that it tries both simultaneously, and uses the quickest response (that's what 'dnsmask' does).
.
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
24-06-2024 11:49 AM - edited 24-06-2024 11:57 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I would be interested to know when you define you own DNS server on the Hub what is ipconfig /all on a windows pc showing the DNS server to be
The Hub's IP Address or the pi-hole IP Address?
EDIT: this assumes the Hub is still acting as the DHCP server
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
24-06-2024 11:50 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
If the router (a) tries both servers simultaneously (b) tries the secondary server only when the primary one fails or (c) interlaces primary and secondary servers but retries with the other IP when one of them fails, then we get the redundancy if one of the Pihole setups fails. The only scenario I can think of where we don't get redundancy is in the case of interlacing but without the retries when one of the Pis fails.
Unless someone already knows the answer, a test with switching off one of the Pis is the only way to find out. This is not great because I was trying to avoid setting up a Pi just for testing. I suppose I could point the secondary DNS to a non-existent Pi and see what happens.
For the record, my DNS IPs on the router are ignored and don't have to worry about them because I have DHCP on the router switched off. That workaround is from my Hub One days when we couldn't change DNS IPs. Pihole gets all the requests and the logs show that.
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
24-06-2024 11:52 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
IP Address 0.0.0.0 is usually used for a place holder where no valid IP Address is required
Re: Can I run 2 Pihole servers on 2 Raspberry Pis?
24-06-2024 12:13 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@Dan_the_Van wrote:
I would be interested to know when you define you own DNS server on the Hub what is ipconfig /all on a windows pc showing the DNS server to be
The Hub's IP Address or the pi-hole IP Address?
EDIT: this assumes the Hub is still acting as the DHCP server
It shows it to be the pi hole LAN address.
Moderator and Customer
If this helped - select the Thumb
If it fixed it, help others - select 'This Fixed My Problem'
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- My Router
- :
- Re: Can I run 2 Pihole servers on 2 Raspberry Pis?