【发布时间】:2013-06-17 10:31:45
【问题描述】:
出于测试目的,我尝试使用this method 获取为域设置的所有DNS 记录的列表。
这行得通:
root@cs:/# dig @nameserver domain
; <<>> DiG 9.9.2-P1 <<>> @nameserver domain
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32999
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;domain. IN A
;; ANSWER SECTION:
domain. 3600 IN A my-IP
;; Query time: 2 msec
;; SERVER: my-IPv6-IP-(I-think)
;; WHEN: Thu Jun 20 16:03:05 2013
;; MSG SIZE rcvd: 83
但是,当我按照关于服务器故障(以及整个网络)的答案中的建议将axfr 添加到命令中时,它会失败:
root@cs:/# dig @ns1.transip.nl changeyourschool.nl axfr
; <<>> DiG 9.9.2-P1 <<>> @ns1.transip.nl changeyourschool.nl axfr
; (2 servers found)
;; global options: +cmd
; Transfer failed.
为什么会这样,更重要的是,如果失败,我如何获得完整的 DNS 记录列表?
【问题讨论】:
标签: shell command-line dns dig