* Open the network tab on any news site and count the domains * Smart TVs are some of the noisiest devices on the network * Extensions are per-browser, per-device, per-profile * The network is the one place everything passes through
* The AI did the typing, the setup on the slides is running at home * If something looks off, ask - it's real experience, so there's a real answer
* Every device already asks a DNS server before connecting anywhere, we just choose which one * Default blocking mode in v6 is NULL - 0.0.0.0 / :: answers * Upstream can be a public resolver, or (later in the talk) our own Unbound * No proxy, no TLS interception, the device just never connects
* Common misconception: "all my traffic goes through the Pi" - it doesn't, a Pi Zero couldn't handle it anyway * Once a name is resolved, the device talks directly to that IP, Pi-hole is out of the picture * A device that already knows the IP (hardcoded, cached) is not affected at all * This is why it's so light, and also why it has limits - next slide
* DNS sees a hostname, not a URL path - /ads and /resume on the same host are the same answer * Paramount+: with the domain blocked, the app can't report or fetch the playback position, every episode starts from the beginning * The fix is a per-domain trade-off: allow it (pihole allow) and accept the ads, or keep it blocked and remember where you stopped * YouTube: ads and videos share googlevideo.com hosts - Pi-hole won't fix YouTube, don't promise it * Leaks: devices with 8.8.8.8 baked in, browsers with secure DNS, Android Private DNS - more on that when we point the network at Pi-hole
* Extensions can do what DNS can't: block a path on a shared domain, hide elements, handle YouTube * Filtering DNS services follow the device anywhere without a VPN, and some add categories (malware, adult content) * They can also be Unbound's upstream at home - a trade-off between their filtering and full resolution (covered in the Unbound part) * Pi-hole covers the devices nobody can install anything on: TVs, consoles, IoT, guests * Turning off telemetry at the source beats blocking it on the way out
* Pi 3/4/5 are more than enough, a Zero 2 W works but Wi-Fi only (or a USB Ethernet adapter) * Lite - no desktop, nothing we don't need * Imager's "OS customisation" saves the need for a screen and keyboard * DHCP reservation is easier to manage than a static IP on the Pi, and keeps all addressing in one place
* The installer asks for an upstream DNS provider - pick anything, we'll replace it with Unbound later * Accept the default lists for now (StevenBlack), we'll talk about lists next * Pi-hole v6 ships its own web server, no lighttpd/PHP anymore * Config lives in /etc/pihole/pihole.toml
* Secondary DNS is not a fallback, clients use it whenever they feel like it * Some ISP routers don't allow changing DNS - Pi-hole has a built-in DHCP server, disable the router's * IPv6: routers may advertise their own DNS over RA - check that too * Known leaks: hardcoded DNS (8.8.8.8), DNS-over-HTTPS in browsers / Android Private DNS
* Gravity is the name for the merged, de-duplicated database (gravity.db) * v6 supports subscribing to allow lists too, useful for curated "don't break this" lists * hosts: "0.0.0.0 ads.example.com", plain: "ads.example.com", ABP: "||ads.example.com^" (blocks subdomains too) * Groups: the kids' tablets get a stricter list, the work laptop gets less
* A list with 3M domains, last updated 2019, mostly dead domains, isn't helping * Lists overlap a lot, Pi-hole de-duplicates, so the count on the dashboard isn't the story * Every false positive is "the internet is broken" from someone at home * "Aggressive" lists break shopping links, analytics-dependent login flows, smart-device apps
* StevenBlack: github.com/StevenBlack/hosts - unified hosts, with optional extensions * HaGeZi: github.com/hagezi/dns-blocklists - Normal or Pro is a good place to start * OISD: oisd.nl - designed to be "set and forget" * Firebog: firebog.net - green ticks are low-risk, blue ticks are more aggressive * pihole -q tells you which list (and which rule) matches a domain - first step when debugging breakage
* Exact is the most common - allow one host that a list overblocks * Wildcard in v6 is a regex generated for you: (\.|^)tiktok\.com$ * Regex is powerful, and easy to overblock with - test before you commit * s.youtube.com is a classic false positive - it breaks YouTube watch history
* v6 renamed whitelist/blacklist to allow/deny * Always add a comment - in a year you won't remember why * Query log has a one-click allow/deny for anything you see * Rules can be assigned to groups, same as lists
* Forwarders (Google, Cloudflare, Quad9) get the full list of every domain you resolve * Recursive: nobody gets the full picture, each authoritative server only sees queries for its zone * First lookup is a bit slower, cache makes up for it * Internal names: nas.mytoynet.de instead of 192.168.1.10
* Based on the Pi-hole docs config, trimmed for the slide - full version in the Pi-hole documentation * Listens only on localhost, on a non-standard port - only Pi-hole talks to it * private-address: public names are not allowed to resolve to private IPs (DNS rebinding protection), local-data is not affected * Debian may enable unbound-resolvconf, which can rewrite the Pi's resolver - see Pi-hole docs if DNS on the Pi itself breaks
* dnssec-failed.org is intentionally broken DNSSEC - a validating resolver must refuse it * Untick every other upstream, otherwise Pi-hole will happily use them too * Pi-hole keeps doing the filtering and caching, Unbound only does resolution
* Full resolution: no one has the whole list, but the queries go out in plain text - your ISP can still read them on the wire * Forwarding over TLS: the ISP sees only an encrypted connection to the provider, the provider sees everything - you pick who you trust * Filtering services add what Pi-hole lists don't: fresh malware and phishing domains, family filters * Local zones are answered before forwarding - mytoynet.de never leaves the house in both setups * Unbound still validates DNSSEC when forwarding
* Remove the forward-zone and Unbound goes back to full recursion - one block to toggle * name: "." means everything, you can also forward just one zone (e.g. a work domain to the VPN's DNS) * @853 is the DNS-over-TLS port, #dns.quad9.net is the name checked against the certificate * Other options: Cloudflare 1.1.1.2 (malware) / 1.1.1.3 (malware + adult), NextDNS with your own profile * Without forward-tls-upstream it's plain DNS on port 53 - the ISP can read it again * Give at least two addresses, otherwise one outage means no DNS at all
* A real domain you own, used only inside the house - why, on the next slide * Put it in its own file, e.g. /etc/unbound/unbound.conf.d/mytoynet.conf * static: answer from local-data, anything else in the zone is NXDOMAIN, never leaves the house * static also hides the public records of the domain (MX, www, _acme-challenge) from home clients - if you have any, use transparent (coming up) * local-data-ptr for reverse lookups - nicer names in the Pi-hole query log
TLS: * Let's Encrypt (or any ACME CA) asks you to prove control of the domain by publishing a TXT record at _acme-challenge.mytoynet.de * The CA checks a TXT record, not a reachable server - internal IPs live only in Unbound, nothing needs to be port-forwarded * Your DNS provider needs an API: certbot DNS plugins, acme.sh, lego, or a reverse proxy with built-in ACME support * Wildcards are DNS-01 only * Certificates are published in Certificate Transparency logs - a wildcard keeps your hostnames out of them too * home.arpa, .lan, .local - no public CA will issue for these, you end up clicking through warnings or running your own CA * Bonus: no more "Not secure" on the NAS, password managers and browsers behave Ownership: * A made-up suffix means whatever the current network says it means * Hotel, office, a friend's Wi-Fi - their resolver may have its own nas.lan, or forward your query to the internet * With mytoynet.de, the public DNS is authoritative and it's yours - at worst it doesn't resolve, it never resolves to a stranger * Not protection from malicious actors - an attacker controlling the network can still lie about DNS, that's what TLS and DNSSEC are for * .corp - leaked internal queries from years of AD setups, ICANN refused to delegate it because of name collisions * .dev - was a popular local suffix until Google bought the TLD, and browsers force HTTPS on all of it (HSTS preload) * .local - reserved for mDNS (Bonjour / Avahi), using it in unicast DNS gives slow or random failures, especially on macOS and phones
* static - the zone is entirely ours, what we used for mytoynet.de so far * transparent - override a few names, let the rest through * redirect - one answer for the zone and all its subdomains transparent: * Use it instead of static when the domain also has public records (a website, mail, the ACME TXT challenge) and home clients should still see them * It's the default for local-data with no local-zone declared * Gotcha: if the name exists locally but not the requested type (e.g. AAAA), you get NODATA, not the public answer redirect: * No local-data allowed below the zone name, the apex record answers everything * Put a reverse proxy in front of everything, add a new service without touching DNS * grafana.apps.mytoynet.de, git.apps.mytoynet.de -> 192.168.1.30, the proxy routes by hostname * Pair it with a *.apps.mytoynet.de wildcard certificate on the proxy - new service, new name, TLS included * Nested zones are fine - Unbound picks the most specific local-zone
* Very short version - a talk of its own * Server: wg-quick on the Pi or the router, or wg-easy in a container (PiVPN is no longer maintained) * Forward one UDP port on the router, dynamic DNS if your IP changes * Split tunnel: DNS + home network only, rest of the traffic goes direct - cheap on battery and bandwidth * Pi-hole must accept queries from the VPN subnet - Settings → DNS → "Permit all origins", safe only because port 53 is NOT forwarded * This is per-device config - the one exception to "no per-device configuration"