如何列出所有DNS记录? [英] How can I list ALL DNS records?

查看:144
本文介绍了如何列出所有DNS记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以列出一个域的所有DNS记录吗?

Is there any way I can list ALL DNS records for a domain?

我知道dig和nslookup之类的东西,但它们仅适用于此。例如,如果我有一个子域A记录,

I know about such things as dig and nslookup but they only go so far. For example, if I've got a subdomain A record as

test A somedomain.co.uk

然后,除非我特别要求。

then unless I specifically ask for it, eg.

dig any test.somedomain.co.uk

我看不到。

有什么办法(除了通过转到DNS查看记录之外)经理)来查看所有DNS记录到底是什么?

Is there any way (other than looking at the records by going to the DNS manager) to see exactly what all the DNS records are?

推荐答案

当您查询ANY时,您将获得所有记录的列表

When you query for ANY you will get a list of all records at that level but not below.

# try this
dig google.com any

如果域名恰好是 google.com,则这可能返回A记录,TXT记录,NS记录,MX记录等。但是,它不会返回子记录(例如,www.google.com)。更准确地说,您可以获取这些记录(如果存在)。如果名称服务器选择不这样做,则不必返回这些记录(例如,减小响应的大小)。

This may return A records, TXT records, NS records, MX records, etc if the domain name is exactly "google.com". However, it will not return child records (e.g., www.google.com). More precisely, you MAY get these records if they exist. The name server does not have to return these records if it chooses not to do so (for example, to reduce the size of the response).

AXFR是一个区域转移,可能是您想要的。但是,这些通常是受限制的,除非您控制区域,否则它们将不可用。通常,您将直接从权威服务器(下面的@ ns1.google.com),通常是从可能未发布的名称服务器(隐身名称服务器)进行区域转移。

An AXFR is a zone transfer and is likely what you want. However, these are typically restricted and not available unless you control the zone. You'll usually conduct a zone transfer directly from the authoritative server (the @ns1.google.com below) and often from a name server that may not be published (a stealth name server).

# This will return "Transfer failed"
dig @ns1.google.com google.com axfr

如果您可以控制区域,则可以对其进行设置以获取受TSIG密钥保护的传输。这是客户端可以发送到服务器以授权传输的共享秘密。

If you have control of the zone, you can set it up to get transfers that are protected with a TSIG key. This is a shared secret the the client can send to the server to authorize the transfer.

这篇关于如何列出所有DNS记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆