Configuring two pi-hole instances

Hello, how do you configure two pi-hole instances?

In the case where the router is used as a DHCP server, I imagine that you simply have to put the two pi-hole IP addresses, but my first pi-hole instance serves as a DHCP server, do I have to put the second one in the DNS upstreams of the first one?

Thanks

Just put a new file in /etc/dnsmasq.d/ called xxxxx.conf on your pi-hole that is the dhcp-server

Content:
dhcp-option=6,aaa.bbb.ccc.ddd,aaa.bbb.ccc.ddd

Option 6—DNS server option. It specifies the DNS server IP address to be assigned to the clients.

1 Like

Thank you for your help, for V6 this option will be present in the toml?

Maybe :wink: for me the above is still working with v6

Have you setup Gravity Sync on both instances? Makes life much easier for syncing settings between multiple Pi-holes.

Gravity sync is no longer maintained by the dev and will not work with Pi-hole V6.

I have never used this kind of tools, in general I make a backup and I use the teleporter, with the passage from V5 to V6 and the big changes, in doubt I would start again on a clean base and make a backup as we do not know if it is 100% compatible, I use docker but it must be transportable on a bare metal

Thank for the tips :wink:

$ man dnsmasq
[..]
              The special address 0.0.0.0 is taken to mean
              "the address of the machine running dnsmasq".

No. Put the IPs of your DNS servers. If the IPs are: 192.168.2.1 and 192.168.2.2 then

dhcp-option=6,192.168.2.1,192.168.2.2

Your're right.
But can mix:

dhcp-option=6,0.0.0.0,192.168.2.2

EDIT:

$ hostname -I
10.0.0.2
$ cat /etc/dnsmasq.d/10-dhcp-dns.conf
dhcp-option=option:dns-server,0.0.0.0,10.0.0.4
$ sudo pihole-FTL dhcp-discover
Scanning all your interfaces for DHCP servers
[..]
   dns-server: 10.0.0.2
   dns-server: 10.0.0.4

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.