Sysadmin > SerVices > DnS > QueryBindVersion

How to query the bind version

dig chaos txt version.bind @10.23.45.67 -> TXT "9.4.1"

Intro

By default BIND DNS reveals the version number when queried for a certain TXT record.

Example

Query this TXT record for example with
dig chaos txt version.bind @<TARGET>

With the result

; <<>> DiG 9.8.1-P1 <<>> chaos txt version.bind @10.12.34.56
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20373
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;version.bind.                  CH      TXT

;; ANSWER SECTION:
version.bind.           0       CH      TXT     "9.4.1"

;; AUTHORITY SECTION:
version.bind.           0       CH      NS      version.bind.

;; Query time: 7 msec
;; SERVER: 10.12.34.56#53(10.12.34.56)
;; WHEN: Fri Jul 10 11:22:37 2015
;; MSG SIZE  rcvd: 62

Override the version

You can manually set the version to any text string with the `option` `version`

options { 
...
        version "f*ck off";
...

Query the binary directly

You can query the binary

# named -v
BIND 9.8.1-P1