beginner · Time varies

Pi-hole network-wide ad blocker

Run a DNS sinkhole on a Raspberry Pi to block unwanted domains for devices across a home network.

View original project ↗

What you’re building

Pi-hole is a Linux DNS sinkhole that blocks requests for configured unwanted domains before content reaches devices on the network. On a Raspberry Pi 5, Pi Zero 2 W, or Pi 400 running a supported Debian-family system, the installer deploys Pi-hole FTL, command-line administration, and a web dashboard. Once the router advertises the Pi-hole host as DNS, phones, computers, televisions, and other DHCP clients can receive network-wide filtering without individual browser extensions. The core constraint is network authority: merely installing the service does not route any client through it. The Pi should have a stable address, the router’s DHCP/DNS settings must be changed, and only one DHCP server should remain active if Pi-hole’s built-in DHCP fallback is used.

Key steps

  1. Install a supported Linux system on the Raspberry Pi and give the host a stable network address.
  2. Review and run Pi-hole’s official installer, choosing the interface, upstream DNS provider, and blocking options.
  3. Open the Pi-hole dashboard and confirm that the FTL service is running.
  4. Configure the router’s DHCP service to advertise the Pi-hole address as DNS; if that is impossible, disable router DHCP before enabling Pi-hole DHCP.
  5. Renew a client’s DHCP lease and verify its DNS queries and blocked domains appear in the dashboard.
Sources

Original project and code

Original project pages, manufacturer documentation and repositories used while preparing this page. Last reviewed .

  1. Project by pi-holepi-hole