Why DNS filtering — the pros, cons, alternatives and complementary controls
DNS-layer filtering is one of those security controls that sounds underwhelming on paper — refusing to resolve some names — and outperforms expectations once it is deployed. It is also frequently oversold. This article tries to give an honest account of where DNS filtering wins, where it does not, and which controls round it out.
Why it works
Three properties make DNS filtering attractive:
- Early in the kill chain. Almost every internet-borne attack does a name lookup before any TLS handshake. Blocking at DNS aborts the attack before any code runs on the endpoint.
- Cheap to operate. A query takes a microsecond at the resolver. A block is a database lookup, not a packet capture. Cost per protected user is typically a few dollars a year.
- Universal. Anything that uses the network uses DNS — Windows, Linux, macOS, iOS, Android, IoT toasters, BYOD phones. You do not need an agent on the device.
The 2021 CISA / NSA joint guidance "Selecting a Protective DNS Service" leans on exactly these properties when it recommends PDNS as a baseline control for federal agencies.
Where it falls short
Equally honest about the limits:
- DNS-bypassing malware. A sample with a hard-coded IP never asks DNS for anything. DNS filtering cannot see it.
- Encrypted SNI / ECH. As Encrypted ClientHello rolls out, hostname-level inspection at the TLS layer becomes harder. DNS still sees the lookup, but downstream controls that relied on SNI need to evolve.
- Resolver bypass. A determined user on an unmanaged device can change their DNS settings. MDM and DoH discovery (DDR) close this gap on managed fleets.
- False positives. Aggressive blocklists routinely flag legitimate CDNs. The cure is curation (covered in our protective DNS overview), not bigger lists.
- No payload inspection. DNS sees the question, not the answer body. A phishing page on a long-lived legitimate hosting domain often slips through.
A useful mental model: DNS filtering catches the majority of opportunistic threats and a meaningful slice of targeted ones, but it is not the last line of defence.
How it compares to neighbouring controls
| Control | Strength | Weakness | Where to use it |
|---|---|---|---|
| Protective DNS | Universal, early, cheap | Hostname only | Every device, every network |
| Email gateway | Catches phishing before users click | Email channel only | Inbound mail |
| Web proxy / SSE | Full URL and (with TLS MITM) body inspection | Expensive, agent-dependent | Managed laptops and offices |
| Endpoint EDR | Behaviour on the host | Reactive once malware runs | Every endpoint |
| Firewall / IDS | Cross-protocol policy | Limited app awareness | Network choke points |
The strongest stacks use all five. The fastest improvement-per-dollar for most organisations is to add protective DNS first if it is not already in place — see Why DNS filtering? and What is protective DNS?.
Picking a deployment model
DNS filtering can be delivered in three shapes:
- Cloud recursive resolver. Devices point at an external DoH/DoT endpoint. Easiest to deploy, no on-prem hardware.
- On-prem resolver with cloud threat feeds. Run BIND or PowerDNS Recursor in-house and pull RPZ feeds from a vendor. Best for high-throughput sites and air-gapped networks.
- Hybrid SSE. DNS filtering as one inspection point in a larger SASE platform, often with the same vendor providing SWG and ZTNA.
A SecDNS deployment usually starts in the first model. You create a profile, install the per-device DoH URL through MDM, and watch the dashboard for the first week to calibrate categories.
curl -X POST https://api.secdns.app/v1/profiles \
-H "Authorization: Bearer $TOKEN" \
-d '{"name":"corporate-laptops","categories":["malware","phishing","nrd"]}'
Complementary controls
Once the DNS layer is in place, the next investments depend on the threat model:
- High-phishing exposure: a strong email gateway plus user training.
- BYOD-heavy environment: MDM and conditional access to keep policies pinned.
- High-value data: an EDR with managed detection and response.
- Regulated industries: a SIEM that ingests DNS logs and correlates with identity and endpoint telemetry.
The goal is not to layer endlessly but to put each control where its strengths show. DNS does the cheap, broad sweep; the other controls handle what slips through.
Further reading
- Glossary: protective DNS, DNS, RPZ, DNSSEC
- Features: DNS over HTTPS, DNS over TLS, DNSSEC validation
- Learn: What is protective DNS?, How DNS attacks work, RPZ explained