Skip to content

Making Pi-hole work on my network

Pi-hole conflics with systemd-resolved

Because the default config of systemd-resolved opens a listener on port 53 (which is used for DNS requests), Pi-hole had a problem and failed because it could not put its own listener on port 53. To fix this, I used the following config in /etc/systemd/resolved.conf to enable mDNS and disable the port 53 listener:


Making DD-WRT tell devices to use the Pi-hole as DNS server

For Pi-hole to be able to do its job, devices need to use it as their DNS server. While it is possible to just configure this on each device individually, I wanted to make this automatic by having my router's DHCP server tell each connecting device to go to the Pi-hole IP for DNS lookups. This turned out to be more tricky to configure than expected.

Eventually, I found that this configuration of DD-WRT on my router does the trick:

  • In "Basic Setup", set "Use DNSMasq for DNS" checked and set "Static DNS 1" to the Pi-hole IP address
  • Under "Services" -> "Dnsmasq", add dhcp-option=6, to the "Additional Dnsmasq Options" box (where is the IP address of the Pi-hole machine on my local network)