Pi-hole: Block Ads and Telemetry for Your Entire Network

In my Copilot hardening guide I recommended a DNS sinkhole as the cleanest way to control telemetry for every device at once. This is the full build: Pi-hole, a free DNS server that answers "what's the address of this tracking domain?" with, effectively, "nothing lives there." Ads, trackers, and telemetry never load, on every device in your house, including the smart TV you can't install anything on.

01 — How a DNS Sinkhole Works

Every connection a device makes starts with a DNS lookup — turning ads.example.com into an IP address. Pi-hole sits in the middle of those lookups. Domains on its blocklists get a null answer, so the connection dies before a single byte of ad or tracker traffic flows. Everything else passes through to a real upstream resolver as normal.

💡 Plain English: Pi-hole is a receptionist for your network's address book. Ask for a legitimate business and the call goes through; ask for a known telemarketer and the receptionist says "no such number" — to every phone in the building at once.

Because it works at the DNS layer, it's invisible to devices and needs zero per-device setup. That's also the source of its main limitation, which I'll be honest about in section 06.

02 — What to Run It On

  • Raspberry Pi — the namesake. Any model from the 3B up is plenty; even a Pi Zero 2 W handles a busy home. Total draw ~2 watts.
  • Any spare Linux box or mini PC — an old laptop or a $40 used thin client works perfectly.
  • A Docker container on a NAS or home server you already run 24/7.

The one hard requirement: the device must be always on, because if Pi-hole is down and it's your only DNS server, your network can't resolve anything. (Mitigations in section 06.)

03 — Installation (10 Minutes)

On a fresh Raspberry Pi OS Lite or Debian/Ubuntu install, first give the machine a static IP — a DNS server that changes addresses breaks the whole network. Reserve its IP in your router's DHCP settings (cleanest method), then run the official installer:

sudo apt update && sudo apt upgrade -y
curl -sSL https://install.pi-hole.net | bash

(Yes, piping a script to bash deserves side-eye on principle — you can download it first and read it, which I'd encourage as a habit.) The installer asks a few questions; the defaults are fine. Choices worth a thought:

  • Upstream DNS: where non-blocked queries go. Cloudflare (1.1.1.2 malware-blocking variant) or Quad9 (9.9.9.9, blocks known-malicious domains) are both solid privacy-respecting picks.
  • Web admin interface: yes. At the end, note the admin password it prints — or set your own:
pihole setpassword

The dashboard now lives at http://<your-pi-ip>/admin.

04 — Point Your Network at It

One router setting deploys Pi-hole to everything: in your router's DHCP/LAN settings, set the DNS server handed to clients to the Pi-hole's IP. Devices pick it up as their DHCP leases renew (reconnect Wi-Fi to force it).

⚠️ Set the DNS in DHCP/LAN settings, not the router's WAN/Internet DNS field. The WAN field makes the router use Pi-hole and hides every device behind one client name; the LAN field makes each device use it, which gives you the per-device visibility that makes the query log useful. Some ISP routers don't allow changing LAN DNS at all — in that case, disable the router's DHCP and enable Pi-hole's built-in DHCP server (Settings → DHCP) instead.

Verify from any computer:

nslookup doubleclick.net
# Should return 0.0.0.0 — blocked
 
nslookup amarbhattarai.com
# Should resolve normally

05 — Blocklists: Quality Over Quantity

Pi-hole ships with a sane default list. The single best upgrade is the OISD big list — community-maintained, aggressive on trackers, and specifically curated to not break legitimate sites:

  • Dashboard → Lists → add https://big.oisd.nl → then Tools → Update Gravity.

Resist the temptation to stack twenty blocklists. Overlapping mega-lists block login pages, payment processors, and email links, and you'll spend your evenings whitelisting. OISD plus the default covers the realistic threat surface. For Microsoft telemetry specifically, you can add targeted domains from my Copilot article (the vortex.data and settings-win.data endpoints) as manual blacklist entries — surgically, since blanket-blocking Microsoft domains breaks Defender cloud protection and OneDrive.

When a site misbehaves, the workflow is always the same: open the Query Log, find the red (blocked) entries from your device at that moment, and whitelist the one that matters. Thirty seconds, and the log teaches you an enormous amount about what your devices actually talk to.

06 — Honest Limitations

  • YouTube and Facebook ads survive. They're served from the same domains as the content, and DNS blocking can't separate them. That's a structural limit, not a configuration error — use browser-level blockers (uBlock Origin) alongside Pi-hole.
  • Single point of failure. Pi-hole down = internet "down" for the household. Mitigate by keeping the install updated (pihole -up), or run a second Pi-hole on another device as the secondary DNS.
  • Devices that bring their own DNS. Some smart devices and browsers use hardcoded DNS or DNS-over-HTTPS, sailing past your sinkhole. The counter is a router firewall rule blocking outbound port 53 from anything except the Pi-hole, which forces honest devices back in line; DoH-evading hardware is a deeper rabbit hole I'll cover in a future networking post.
  • It's privacy infrastructure, not antivirus. Pi-hole reduces tracking and blocks known-bad domains; it does not inspect traffic or stop malware that's already running.

07 — Five-Minute Maintenance Routine

  • pihole -up monthly (updates Pi-hole itself).
  • Gravity (blocklist) updates run weekly on their own — leave them.
  • Skim the dashboard's top blocked domains occasionally; it's how I first noticed exactly how chatty a brand-new smart TV was — the day it came out of the box it was the top talker on the entire network.
  • Before blaming a broken website on its owner, check your Query Log. It's Pi-hole more often than I'd like to admit.

🔒 Bottom line: for the cost of a Raspberry Pi and an hour of setup, every device you own — including the ones you can't configure — gets tracker and telemetry blocking, plus a query log that shows you exactly what your network does when you're not looking. Few projects in home networking return this much for this little.