← All projects

Pi-hole Network-Wide Ad Blocker

Easy · ~30 minutes · Any Pi (Zero W and up)

Pi-hole is a DNS sinkhole. Instead of installing an ad blocker on every device, you point your router at the Pi and it blocks tracker and ad domains for everything on your network — phones, TVs, consoles, the lot.

You'll need

1. Install Pi-hole

SSH into the Pi and run the official installer:

curl -sSL https://install.pi-hole.net | bash

The installer is interactive. Accept the defaults unless you have a reason not to. When asked for an upstream DNS, Cloudflare (1.1.1.1) or Quad9 (9.9.9.9) are both good picks. At the end it prints the admin password — write it down.

Heads up: piping curl to bash is a real security tradeoff. If you're cautious, download the script first, read it, then execute.

2. Point your network at the Pi

In your router's DHCP settings, set the primary DNS to the Pi's IP address. Remove any secondary DNS — if you leave 8.8.8.8 as a fallback, devices will route around the blocker.

Restart your router or release/renew your devices' leases so they pick up the new DNS.

3. Verify it's working

Open http://<pi-ip>/admin in a browser. You should see the dashboard with live query counts climbing as devices on your network make DNS lookups. Browse to a normally ad-heavy page and watch the "blocked" counter tick up.

4. Add extra blocklists

The default list is conservative. Go to Group Management → Adlists and add a few from firebog.net — the "ticked" lists are well-maintained and unlikely to break sites.

Troubleshooting