Pihole: Ziggo and using Pihole as DNS

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.

Join the Conversation

4 Comments

  1. Hey there, nice little guide. I would like to install Pi-Hole on a headless ubuntu server. Im encountering the same issues with the Ziggo router, limiting capabilities. I could, however redirect my devices towards Pi-Hole dhcp server (like you mentioned), can i presume that these devices are still protected by my routers firewall? Btw, i have some devices on a static-ip, is such functionality possible aswell with Pi-Hole’s DHCP server?

    greeting Tim

    1. Yes, a static IP is possible with DHCP from Pihole. The thing that you need to do is to give certain mac-addresses a static DHCP lease.

      This can be done in the settings -> DHCP -> DHCP Leases. Define the MAC and the static ip address.

      1. Hi there,

        Thanks for responding! So before switching over to Pi-Hole’s DHCP server, i should first copy/paste my static ip adresses from my Ziggo router to Pi-Hole. Then define the iprange (ideally the same as Ziggo’s) and then turn off Ziggo’s DHCP server(?)

        What about the firewall, is this still being used even though i reroute my DHCP server to Pi-Hole. Btw, what would your preference be, Pi-Hole or AdGuard?

        1. That is correct. First setup your dhpc server on the pi. And if that is done disable it on the ziggo modem. Reboot your system, or disconnect/connect from the network and all should be good. If not you can easily enable it again since the ip adres of your modem stays the same (as far as I can remember) so if you don’t have a internet connection you can still reach the modem.

          Regarding the firewall, if you don’t disable it yourself in the modem it will be working. But it is always a good idea to have an extra firewall on your pihole / rpi just in case. In my setup I have enabled the firewall on it ( ufw I think it is called) and closed all ports except those used by DHCP, DNS and web. But that firewall has nothing to do with the protection of the network. It will only protect the pi itself.

          If you enable the firewall on the pi you should check which ports are used for dhcp, dns and web. I think for dhcp it’s 67 (udp), dns 53 (tcp) and web 80 (tcp).

          Your question about addguard vs pihole I can’t answer since I only use pihole.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.