Michal Čihař - How to get info about DNS server?

How to get info about DNS server?

I never knew there are few special zones in DNS to grab infromation about DNS servers. Today while browsing PowerDNS recursor configuration, I noticed several config options defining replies on those special queries. So if you want to know which server is on the other side, you can try querying version.bind, version.pdns or id.server (CHAOS type, TXT class):

$ dig version.bind chaos txt

; <<>> DiG 9.3.2 <<>> version.bind chaos txt
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56291
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

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

;; ANSWER SECTION:
version.bind.           86400   CH      TXT     "PowerDNS Recursor 3.1.1 $Id: pdns_recursor.cc 838 2006-05-19 14:35:27Z ahu $"

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Jun  2 15:30:06 2006
;; MSG SIZE  rcvd: 119