Mac Os X 终端:如何查看域的区域文件?

发布于 2024-10-04 05:06:55 字数 128 浏览 1 评论 0原文

我正在尝试查询一个域以检索其完整的 DNS 区域列表(A、MX、CNAME,...)

似乎 host -a 仅返回 NS 和 MX 记录。

任何帮助将不胜感激。

谢谢。

I'm trying to query a domain to retrieve its full DNS zone listings (A, MX, CNAME,…)

It seems that host -a is only returning the NS and MX records.

Any help would be much appreciated.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

狼性发作 2024-10-11 05:06:55
→ dig -t ANY stackoverflow.com 

; <<>> DiG 9.6.0-APPLE-P2 <<>> -t ANY stackoverflow.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20242
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;stackoverflow.com.     IN  ANY

;; ANSWER SECTION:
stackoverflow.com.  1202    IN  A   64.34.119.12
stackoverflow.com.  65902   IN  NS  ns3.p19.dynect.net.
stackoverflow.com.  65902   IN  NS  ns1.p19.dynect.net.
stackoverflow.com.  65902   IN  NS  ns4.p19.dynect.net.
stackoverflow.com.  65902   IN  NS  ns2.p19.dynect.net.

;; Query time: 38 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Tue Nov 23 19:55:51 2010
;; MSG SIZE  rcvd: 137

这对你有用吗?

→ dig -t ANY stackoverflow.com 

; <<>> DiG 9.6.0-APPLE-P2 <<>> -t ANY stackoverflow.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20242
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;stackoverflow.com.     IN  ANY

;; ANSWER SECTION:
stackoverflow.com.  1202    IN  A   64.34.119.12
stackoverflow.com.  65902   IN  NS  ns3.p19.dynect.net.
stackoverflow.com.  65902   IN  NS  ns1.p19.dynect.net.
stackoverflow.com.  65902   IN  NS  ns4.p19.dynect.net.
stackoverflow.com.  65902   IN  NS  ns2.p19.dynect.net.

;; Query time: 38 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Tue Nov 23 19:55:51 2010
;; MSG SIZE  rcvd: 137

Does that work for you?

霞映澄塘 2024-10-11 05:06:55

TL;DR

https://superuser.com/questions/24389/is-there-a-way-to-get-the-complete-zone-file-for-a-domain-without-contacting-its


秉承开源和自由选择的良好传统,这里有另一个选项:host -t NS stackoverflow.com 它将输出以下内容:

stackoverflow.com name server ns-cloud-e1.googledomains.com.
stackoverflow.com name server ns-358.awsdns-44.com.
stackoverflow.com name server ns-1033.awsdns-01.org.
stackoverflow.com name server ns-cloud-e2.googledomains.com.

因为您已经指定了类型。或者使用标志 -a 来查看所有记录。或者,您可以使用nslookup -type=any stackoverflow.com。但不幸的是,这些选项都不会为您提供区域文件。但是如果您在另一个 stackexchange 论坛上搜索,您会在这里找到答案: https://superuser.com/questions/24389/is-there-a-way-to-get-the-complete-zone-file-for -a-domain-without-contacting-its

TL;DR

https://superuser.com/questions/24389/is-there-a-way-to-get-the-complete-zone-file-for-a-domain-without-contacting-its


In good traditions of opensource and freedom of choice, here's anther option: host -t NS stackoverflow.com which would output following:

stackoverflow.com name server ns-cloud-e1.googledomains.com.
stackoverflow.com name server ns-358.awsdns-44.com.
stackoverflow.com name server ns-1033.awsdns-01.org.
stackoverflow.com name server ns-cloud-e2.googledomains.com.

because you've specified the type. Or use flag -a instead to see all records. Alternatively you may use nslookup -type=any stackoverflow.com. But unfortunately none of these options would give you the zone file. BUT if you'd search on another stackexchange forum you would find the answer here: https://superuser.com/questions/24389/is-there-a-way-to-get-the-complete-zone-file-for-a-domain-without-contacting-its

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文