DNS & DNSSEC�operational best practices
Sleep better at night with KINDNS in your network!
These materials are licensed under the Creative Commons Attribution 4.0 International licence.
http://creativecommons.org/licenses/by/4.0/
Note to TWNOG PC
Acknowledgements
Enough about me. Who are you?
KINDNS: background
KINDNS /ˈkaɪndnəs/ (noun) Knowledge-Sharing and Instantiating Norms for DNS and Naming Security�
A simple framework that can help a wide variety of DNS operators, from small to large, to follow both the evolution of the DNS protocol and the best practices that the industry identifies for better security and more effective DNS operations.
See also: https://kindns.org
What kind of DNS operator are you?
KINDNS: targeted operators
Authoritative operators
Resolver operators
TLDs & critical zones
SLDs
Closed & private
Shared private
Public
Hardening the core system
By joining the KINDNS initiative, DNS operators are voluntarily committing to adhere to the identified practices and act as “goodwill ambassadors” within the community.
CORE GUIDELINES (FOR EVERYONE)
Basic common-sense guidelines for DNS operations of all shapes and sizes
Core guidelines (for everyone)
ACLs restrict traffic to DNS servers
BCP38
DNS servers run DNS and nothing else
DNS configuration in revision control
Credential management
RECURSIVE RESOLVER OPERATORS
DNSSEC validation is easy – turn it on already!
Best practices
DNSSEC in a nutshell
1. I know NS of com. — Cached�2. Do I know example.com.? — No!
3. Send query to TLD server ... wait
5
“.”
Root Server
Recursive
Resolver
“example.com.”
Authoritative
Server
“.com.”
TLD Server
Client
(Stub Resolver)
What is the
IPv6 address of
www.example.com?
1
1. Do I have answer in cache? — No!
2. Do I have a resolver? – Yes!
3. Query: www.example.com. AAAA
4. Send to recursive resolver ... wait
2
1. Do I have answer in cache? — No!
2. Do I know example.com.? — No!�3. Send query to root server ... wait
3
1. Do I know www.example.com.? — No!�2. Do I know com.? — Yes!�3. Reply: com. nameservers’ IPs
4
1. Do I know www.example.com.? — No!�2. Do I know example.com.? — Yes!�3. Reply: example.com. Nameservers’ IPs
6
1. I got AAAA of www.example.com.— Cache
2. Reply: AAAA of www.example.com is
2001:db8::80
9
1. Do I know www.example.com. AAAA? — Yes!�2. Reply: AAAA of www.example.com is 2001:db8::80
8
1. Return AAAA of www.example.com
2. Store in cache for TTL seconds
10
2
9
3
5
6
7
8
Query?
Response!
7
1. Know NS of example.com.— Cache
2. Send query to nameserver ... wait
4
Recursive Resolver is prepopulated with root DNS server addresses and the root’s public key
root key
Set DO bit
+DS,RRSIG,DNSKEY
+DS,RRSIG,DNSKEY
+RRSIG,DNSKEY
Set AD bit
com key
example key
root pubkey
Set DO bit
Set DO bit
Set DO bit
Diagram credit: Md Abdul Awal
Enabling DNSSEC
If you don’t turn it off, it will Just Work!
Enabling DNSSEC (2)
Split-horizon DNS & other edge cases (1)
Split-horizon DNS & other edge cases (2)
Restrict access to your networks
Enable QNAME minimisation
Cannot run KINDNS-compliant recursive DNS on Windows (but why would you want to try…?)
Availability and resilience
Monitoring
(Bonus) DoT and DoH should be supported
AUTHORITATIVE ZONE OPERATORS
DNSSEC is not optional. It’s not as hard as it looks.
Best practices
Sign your zones
zone "example.com" in {
type master;
file ”db.example.com";
key-directory "/etc/bind/keys";
inline-signing yes;
auto-dnssec maintain;
};
Where named should look for the DNSSec key files
BIND keeps unsigned zone and creates a signed zone
off
allow
maintain
Default. Keys are managed manually
Allows uploading keys and resigning the zone
when user runs “rndc-sign [zone-name]”
Same as “allow” +automatically adjusts the keys on schedule
Zone file integrity
Primary
server
Secondary
server
Dynamic Update
Query/Response
(Secondary server)
Resolver
Client�(Stub Resolver)
Zone data
synchronization
Update
Station
Query/Response
(Primary server)
Zone File
Zone data access
DNS Query/Response
Cache impersonation
Unauthorized updates
Corrupting Data
Impersonating master
Cache pollution by
data spoofing
Data protection
Server protection
Availability and resilience
CCTLDS AND CRITICAL ZONES
Focus on resilience
Best practices – same as authoritative
Separation of duties
At least two distinct name servers
Software diversity
KINDNS SELF-ASSESSMENT
Assess your operational practices and correct/adjust unaligned practices
KINDNS enrolment
Join the KINDNS initiative!