Note: A version of this article was originally published on the TechSavant blog. The canonical URL points there.

DNS filtering is one of the highest-leverage controls you can run. Block a domain at the resolver — with Pi-hole, a DNS firewall, or a service like NextDNS — and it's blocked for every application on the device at once. No agent, no certificate, no per-app policy.

But it has a quiet failure mode that undermines the whole premise: it only protects the devices that actually use it. And on a modern network, a surprising number of devices don't.

Why a device "forgets" your resolver

When you point your network at a filtering resolver, you're trusting every endpoint to send its DNS there. Several common behaviours break that assumption:

  • Hard-coded resolvers. Smart TVs, IoT gadgets, and some phones ship with 8.8.8.8 or 1.1.1.1 baked in and ignore the DNS server your DHCP hands them.
  • DNS-over-HTTPS (DoH). Browsers and operating systems increasingly send DNS inside ordinary HTTPS on port 443. To your network it looks like normal web traffic — your resolver never sees the query, and your blocklists never get a chance to act.
  • DNS-over-TLS (DoT) and plain port 53. Any app can open its own channel to an external resolver unless the network explicitly stops it.

The result is shadow DNS: resolution happening on your network that your filtering never touches. Your dashboards look healthy — queries flowing, domains blocked — but they only reflect the devices playing by the rules.

A blocklist is only as good as the share of your traffic that actually passes through it.

Why it matters beyond ad-blocking

It's tempting to treat this as a home-lab curiosity, but the same gap carries real weight on a business network:

  • Lost visibility. DNS logs are one of the richest, cheapest telemetry sources a SOC has. Every bypassed device is a blind spot.
  • Defeated controls. Threat-intel domain blocking, newly-registered-domain policies, and malware-callback blocking all live at the resolver. Bypass it and those protections silently stop applying.
  • Compliance drift. Content and DLP policies enforced through DNS quietly fail for any device routing around them.

Measuring the gap

You can't close what you can't see, so I open-sourced a small set of pure-shell tools to audit this on a network you own: network-tools (MIT, Linux & macOS).

1. Audit one host's DNS posture

dns-leak-check.sh is non-disruptive and needs no root. It reports the resolver in use, whether filtering is active, whether the upstream is encrypted, the egress IP, and — crucially — whether this host can reach external DNS over 53/DoH/DoT.

git clone https://github.com/alexwiz117/network-tools cd network-tools ./dns-leak-check.sh 

Run it on each device and compare. The lines you care about are the bypass checks — if a host can reach 8.8.8.8:53, a public DoH endpoint, or 1.1.1.1:853, it can skip your filter:

== 5. Can THIS host bypass to external DNS? (want these blocked) == [ok] plaintext 53 -> 8.8.8.8 blocked [! ] DoH -> cloudflare-dns.com reachable — encrypted bypass open [ok] DoT 853 -> 1.1.1.1 blocked 

2. Catch active bypassers on the LAN

arp-dns-watch.sh is an interactive, menu-driven monitor (Linux, authorized-use only). You pick target devices (or the whole LAN); it relays traffic safely with IP forwarding, sniffs only external DNS, reports which devices skip your resolver, and heals the ARP tables on exit.

sudo ./arp-dns-watch.sh 

⚠️ This performs ARP-based interception. Only run it on a network you own or are explicitly authorized to test.

Closing the gap

  • Redirect or block external DNS at the gateway. NAT outbound port 53 back to your own resolver, or block it, so hard-coded resolvers are forced onto your filter.
  • Block DoH at the edge by denying the well-known DoH bootstrap domains (e.g. use-application-dns.net) and public DoH provider endpoints, so browsers fall back to system DNS.
  • Prefer managed resolver settings on managed fleets — enforce by policy instead of trusting device defaults.
  • Monitor for silence. A device that suddenly stops querying your resolver is as interesting as one querying something malicious. Alert on it.

The takeaway

DNS filtering remains one of the best returns on effort in security — but only across the traffic that actually reaches it. Before you trust the dashboard, measure how much of your network is really behind the filter and how much is quietly resolving in the shadows. The gap is usually bigger than people expect, and almost always closable once you can see it.

Tools: github.com/alexwiz117/network-tools · project site. Full write-up on the TechSavant blog.