Use this when distributing DNS blocklists through response policy zones.
RPZ
RPZ (Response Policy Zones) lets a recursive resolver rewrite or block answers for listed domains, IPs or name servers, distributing DNS blocklists as ordinary zone transfers.
1. RPZ (Response Policy Zones) let resolvers rewrite answers by policy.
2. Feeds from threat intel providers.
3. Actions: NXDOMAIN, NODATA, local data (sinkhole).
4. Log RPZ hits.
5. Whitelist exceptions.
query → RPZ match → rewritten answer
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
dig @resolver blocked.exampleVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
rndc zonestatus rpz.local
dig @resolver blocked.example
grep "rpz" /var/log/named/rpz.log
A blocked name returns NXDOMAIN or the walled-garden address; the RPZ log shows the client IP and the rule that matched.
Step 2 Common mistakes Narrow the fault
- RPZ feeds blocking business domains without exceptions.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- RPZ rewrites answers for listed names or IPs.
- Feeds update via zone transfers.
- Log RPZ hits for investigation.
named-checkzone rpz.local /etc/bind/db.rpz— validate RPZ zonerndc stats / unbound-control list_local_zones— RPZ/local zones loadeddig @<resolver> <rpz-listed-domain>— policy applied
ReferenceWhy it matters1 section · depth on demand
BIND RPZ example
options { response-policy { zone "rpz.local"; }; };
zone "rpz.local" { type primary; file "rpz.local.db"; };
; rpz.local.db
bad.example.com CNAME . ; NXDOMAIN
*.bad.example.com CNAME .
phish.example.net A 10.99.0.99 ; sinkhole
Documented example, not captured output. Threat-intelligence providers publish RPZ feeds that resolvers can transfer automatically.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Response Policy Zones (RPZ) let a recursive resolver override answers according to policy loaded as a DNS zone. Threat intelligence providers publish RPZ feeds of malicious domains, which resolvers apply automatically through zone transfers.
; rpz.local zone
bad-domain.example CNAME . ; NXDOMAIN
*.bad-domain.example CNAME .
phish.example A 10.99.99.99 ; sinkhole
Documented example, not captured output.
# BIND named.conf
options { response-policy { zone "rpz.local"; zone "rpz.threatfeed"; }; };
Supported by BIND, Unbound (via modules/RPZ), PowerDNS Recursor, Infoblox and others. Log RPZ hits to the SIEM — each hit may indicate an infected or phished client.
RPZ actions
| Policy | Effect |
|---|---|
CNAME . | NXDOMAIN |
CNAME *. | NODATA |
A 10.10.10.10 | Redirect to a walled garden/sinkhole |
CNAME rpz-passthru. | Allow (exception) |
CNAME rpz-drop. | Drop the query |
Commercial feeds (Spamhaus, Infoblox) and free feeds can be loaded as RPZ zones by zone transfer.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in DNS Security → RPZ. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4033 · confidence 94%