Pi-hole Network-Wide Ad Blocker
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
- Any Raspberry Pi running Raspberry Pi OS (Lite is fine — no desktop needed)
- Wired Ethernet recommended (DNS is latency-sensitive)
- A static IP for the Pi (set in the router's DHCP reservations)
- Admin access to your router
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.
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
- Sites broken? Whitelist the domain in the admin UI. Don't disable the blocker globally — fix one domain at a time.
- Devices ignoring the Pi? Many smart TVs and Chromecasts hardcode 8.8.8.8. Block outbound DNS (port 53) on your router and let only the Pi through.
- DNS over HTTPS? Browsers like Firefox bypass system DNS via DoH. Disable DoH in browser settings or use Pi-hole's built-in DoH support via cloudflared.