Last time I wrote about using pihole on the raspberry pi and some other things regarding pi. One of the things that I couldn’t get to work in pi was to let pihole be the DHCP server and forcing all devices on my network to use the pihole as primary DNS. Finally I succeeded.
For those in the Netherlands and who have ziggo. You need to do the following to be able to use pihole as the DHCP Server
1) Open up pihole and go to Settings -> DHCP. The only thing you need to do is to add the router (gateway) ip and to enable the dhcp server. Also check if the range is correct.
2) Go to ziggo modem admin and disable DHCP
3) restart your device or disconnect/connect it from your network
This last step should force your device to go look for a DHCP server on your network. It should find the pihole. When that is done you should see that the primary dns is the ip adres of your pihole. Now if you have a second pihole, like I do, you can provide the devices in your network with a secondary DNS. This is done by editing the following file /etc/dnsmasq.d/02-pihole-dhcp.conf on the pi that is the DHCP server and add the following line to it: dhcp-option=6,192.168.0.49,192.168.0.46
The two ip adresses should be the ones from your dns servers you want to provision into your network. How those dns servers are used are up to the OS. In any case. This should give you a little hint on how to use pihole as dhcp server.
oh btw.. if you want to keep the blacklist on both devices in sync I can recommend creating a little github repo and add your own adlist to it. Add it to the adlist of both pihole’s and clean the blacklist.