brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: dig DS shows the key the parent zone expects you to sign with

Dig
~/tips/tip-dig-ds-key-tag

dig +noall +answer DS example.com

Compare the DS record at the parent with your DNSKEY key tags before and after a key change.

A domain signed with DNSSEC only validates when the DS record at the registry points at a key that the domain really publishes. Two dig commands show whether they match.

dig +noall +answer DS example.com
dig +noall +answer +multiline DNSKEY example.com

The DS answer starts with three numbers, for example 2371 13 2: the key tag, the algorithm (13 is ECDSA P-256) and the digest type (2 is SHA-256). With +multiline, dig prints a comment after each DNSKEY such as ; KSK; alg = ECDSAP256SHA256 ; key id = 2371. When the key tag in the DS equals the key id of a KSK, the chain is linked.

I’d run these two whenever a domain moves to another DNS provider or the keys roll over. A DS that points at a key the domain no longer publishes makes validating resolvers return SERVFAIL for the whole domain, which looks like an outage for a part of your visitors only.

No DS at all means the domain is simply not signed from the parent’s point of view, even if it publishes DNSKEY records. Key tags are only 16 bits, so two keys can share a tag; for a strict check compare the digest too, for example with dnssec-dsfromkey from the BIND tools. The DS is cached by resolvers for its own TTL, often a day, so after a change at the registrar old answers can stick around for a while.

Further reading: dig manual (BIND 9), RFC 4035: DNSSEC protocol modifications

Going deeper: Guide: dig for beginners, look up DNS records and read the answer

More Dig tips dig nope.iana.org @9.9.9.9 | grep -E 'status|SOA' dig +search nas dig @8.8.8.8 www.google.com +subnet=203.0.113.0/24 dig +yaml example.com A dig +short +identify example.com @9.9.9.9 All Dig tips (36) All topics

Link