加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

shell – 使用axfr选项进行DiG传输失败

发布时间:2020-12-15 21:07:05 所属栏目:安全 来源:网络整理
导读:出于测试目的,我正在尝试使用 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: NO
出于测试目的,我正在尝试使用 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记录列表?

解决方法

为什么会这样,我不知道,但您可以使用它来获取所有DNS记录:

root@cs:/# dig google.com ANY +nostat +nocmd +nocomments

; <<>> DiG 9.9.2-P1 <<>> google.com ANY +nostat +nocmd +nocomments
;; global options: +cmd
;google.com.                    IN      ANY
google.com.             56328   IN      NS      ns4.google.com.
google.com.             56328   IN      NS      ns2.google.com.
google.com.             56328   IN      NS      ns1.google.com.
google.com.             56328   IN      NS      ns3.google.com.
ns4.google.com.         85545   IN      A       216.239.38.10
ns1.google.com.         85545   IN      A       216.239.32.10
ns3.google.com.         57402   IN      A       216.239.36.10
ns2.google.com.         85545   IN      A       216.239.34.10

可以省略nostat,nocmd和nocomments添加,但减少无用的输出.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读