Quotidien Hebdomadaire Mensuel

Quotidien Shaarli

Tous les liens d'un jour sur une page.

December 5, 2023

Secondary DNS Server for DHCP - Help - Pi-hole Userspace

To force piHole to push a defined IP address as DNS server to DHCP clients:

  1. Edit /etc/dnsmasq.d/02-pihole-dhcp.conf file:
    #> sudo nano /etc/dnsmasq.d/02-pihole-dhcp.conf

  2. Add the IP address to be push as DNS server:
    dhcp-option=6,<Pi-holeIP>,<SecondaryDNSServerIP>

  3. Save file modification.

  4. Restart pihole-FTL server:
    sudo service pihole-FTL restart

⚠️ You would have to release/renew DHCP lease on each host after that to pull the new settings.
⚠️ Change is not persistant over time as this file can be overwritten by piHole.