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 CH TXT version.bind asks a name server what it runs

Dig
~/tips/tip-dig-chaos-version-bind

dig @a.iana-servers.net CH TXT version.bind +short

Query the CHAOS class to see which software and version a DNS server reports.

DNS has a rarely used class next to the usual IN: CH, for CHAOS. Many servers answer a TXT query for version.bind in that class with their software name and version.

dig @a.iana-servers.net CH TXT version.bind +short
dig @9.9.9.9 CH TXT version.bind +short
dig @192.0.2.53 CH TXT version.server +short

The answers vary a lot. One server says "Knot DNS 3", a public resolver may return its own build tag, and many return nothing or a refusal. version.server is a newer name for the same question that some servers prefer.

I’d mainly use this on servers you run yourself. It is a quick way to see whether an upgrade of BIND, Unbound or a Pi-hole’s FTL really landed, without logging in. It also shows what an outsider can learn, which is the security side of it: a precise version string makes it easier to match known bugs.

So for a server that faces the internet, I would hide or replace the string. BIND takes version "none"; in its options, and Unbound has hide-version: yes. Do not take the answer as proof of anything either: the string is whatever the admin configured, so it can be blank, fake or a joke. And the query only works when you aim it at a specific server with @.

Further reading: dig manual (BIND 9), Unbound: unbound.conf

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

More Dig tips dig +noall +answer DS example.com 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 All Dig tips (36) All topics

Link