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 +cd skips DNSSEC validation, which shows whether validation is the problem

Network and access
~/tips/tip-dns-dig-cd-flag

dig example.com +cd

Sends a query with the checking-disabled bit to see if DNSSEC validation causes a failure.

A name that fails with SERVFAIL on one resolver and works on another often has a DNSSEC problem. dig has a quick way to check that suspicion.

Run the query twice, once normally and once with the CD bit set:

dig example.com
dig example.com +cd

The manual says +cd (the same as +cdflag) sets the CD, checking disabled, bit in the query, which requests the server to not perform DNSSEC validation of responses. If the first query returns SERVFAIL and the second returns an answer, the data exists but the validation fails. That points at broken or expired signatures, or a bad DS record at the parent, and away from a dead name server.

You can combine it with +dnssec and a resolver of your choice to compare what comes back. Using a placeholder resolver address:

dig @192.168.1.53 example.com +cd +dnssec

The same query against a local resolver and a public one shows quickly which of them validates and which does not. Reading the status: field in the header, SERVFAIL in one and NOERROR in the other, is usually enough to see where the difference sits.

The caveat is what the answer means. A response you get with +cd has not been validated, so use it to diagnose and never to trust the data. If the failing zone is yours, fix the signatures or the DS record instead of turning validation off on your resolver.

Further reading: dig manual (+cd)

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

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link