Sub topic 13
Validating DNSSEC on Your Resolver
Assume you understand DNS records, recursive resolution, and basic Unbound or BIND configuration. This chapter focuses on validation, not on signing your own authoritative zone.
DNS Security Extensions (DNSSEC) add digital signatures to DNS data. A validating resolver checks those signatures before returning an answer. Validation protects against forged or modified records, but it does not encrypt DNS traffic.
How validation works
A recursive resolver normally follows referrals from the root zone to a top-level domain and then to the authoritative server. With DNSSEC, each signed zone provides a chain of trust:
The resolver starts with a configured trust anchor, normally the root zone's key. It checks each zone's DNSKEY and DS records, then verifies the requested record's RRSIG signature.
A validated response normally has the ad flag, meaning authenticated data. A response with SERVFAIL often means validation failed. The domain may be misconfigured, its signature may have expired, or the resolver's clock may be wrong.
The DO option asks a DNS server to include DNSSEC records in the response. The ad flag reports the resolver's validation result.
dig @127.0.0.1 example.org A +dnssecInspect the flags in the response header:
;; flags: qr rd ra ad;The ad flag is evidence that the resolver validated the answer. Its absence does not by itself prove that validation is disabled, because the answer might be unsigned.
Enable validation
Unbound commonly enables root trust-anchor management through its package configuration. A minimal configuration can state the policy explicitly:
server:
interface: 127.0.0.1
access-control: 127.0.0.0/8 allow
access-control: 0.0.0.0/0 refuse
auto-trust-anchor-file: "/var/lib/unbound/root.key"
val-permissive-mode: noauto-trust-anchor-file stores the root trust anchor. val-permissive-mode: no prevents Unbound from silently accepting answers that fail validation.
BIND enables validation in its options block:
options {
recursion yes;
dnssec-validation auto;
allow-recursion { 127.0.0.1; 192.0.2.0/24; };
};dnssec-validation auto uses the built-in root trust anchor. Keep the resolver's system clock synchronized because DNSSEC signatures have validity periods.
Test failures deliberately
Use a domain designed to fail DNSSEC validation:
dig @127.0.0.1 dnssec-failed.org A +dnssecA validating resolver should normally return SERVFAIL. Compare it with a known signed domain:
dig @127.0.0.1 cloudflare.com A +dnssecIf every signed query fails, check the system time, network access to authoritative DNS servers, the trust-anchor file, and resolver logs. If only one domain fails, inspect that domain's delegation and signatures.
Exercise
What does the ad flag in a dig +dnssec response indicate, and what does SERVFAIL commonly indicate during DNSSEC validation?
Show answer
ad indicates that the resolver authenticated the answer. SERVFAIL commonly indicates that validation failed or that the resolver could not complete the DNS lookup.