The issue I am facing:
I am experimenting with adding a second pi-hole to my network. I may use the second as a redundant fall-back, or I may decide to send DNS queries from certain devices to one and those from other devices to the other. For simplicity, I'm doing the latter while I test things out.
I have both up and running on the network. Everything seems fine. Except that both call themselves "pi.hole" in /etc/pihole/local.list. When I go to http://pi.hole/admin, I always end up at the first pi-hole (192.168.1.230).
I tried changing that entry to something else on the 2nd pi-hole. Nothing on the network can see it at the new name. I then tried adding entries for both pi-holes in both local.list files, but still no luck.
I have looked into the lighttpd configuration files and related documentation, but it seems that the name at which the web server is accessed is not defined within/by lighttpd. As far as I can tell, it is solely defined in local.list.
Details about my system:
One raspberry pi, the original, is a 3B+ at 192.168.1.230 called 'raspberrypi'. The one I'm adding is a 2B at 192.168.1.232 called 'pi2b'. I have an Asus RT-AC68U router at 192.168.1.1.
The router allows the device at each reserved IP address to be assigned a specific DNS server. So to test whether both pi-holes are working, I've assigned some network devices to use 192.168.1.230 and others to use 192.168.1.232 as their DNS servers. This seems to be working fine, and queries from the various devices are appearing in the logs of the correct pi-holes.
But when I try to visit the web server admin page at http://pi.hole, I always end up at 'raspberrypi' (192.168.1.230). In order to view the web interface of the 2nd pi-hole, I have to use http://<IP address>/admin/.
In fact, when I visit http://pi.hole/admin (1.230) from devices that use (1.232), neither http://pi.hole nor http://pi2b.hole can be found.
What I have changed since installing Pi-hole:
My set up is this:
- The router's LAN DNS server is set to 192.168.1.230 (though 192.168.1.232 for some devices).
- All DNS queries on the LAN are sent to the pi-holes (the router's address is not advertised).
- The pi-holes' upstream DNS server is the router, which then forwards them to its own upstream DNS server (1.1.1.1/1.0.0.1).
- Conditional forwarding is set up on both pi-holes.
The first local.list file is still the default, which is this, and it works:
192.168.1.230 raspberrypi
192.168.1.230 pi.hole
I changed the second local.list file to
192.168.1.232 pi2b
192.168.1.232 pi2b.hole
But I couldn't access http://pi2b.hole from any device (yes, I restarted the router and both pi-holes). I then tried changing both local.list files to the following (and restarted everything again):
192.168.1.230 raspberrypi
192.168.1.230 pi.hole
192.168.1.232 pi2b
192.168.1.232 pi2b.hole
I can still only access http://pi.hole and I cannot access http://pi2b.hole.
Can anyone help?
Thanks