从命令行检查名称服务器设置

发布于 2024-08-03 19:44:31 字数 219 浏览 2 评论 0原文

有没有办法检查我的域名是否在名称服务器上正确设置?理想情况下,我想从命令行运行命令,或者可以使用第三方工具。

例如,我正在尝试注册一个托管在 godaddy.com 上的域。我已经设置了域并且可以在我的 DNS 列表中看到它。应该设置的服务器是 ns51.domaincontrol.com 和 ns52.domaincontrol.com,但是我的注册被退回,提示“没有为 {我的新域} 找到域名服务器”。

Is there a way to check if my domain is setup correctly on the nameservers? Ideally I'd like to run a command from command line, alternatively can use a third party tool.

for example, I'm trying to register a domain that's to be hosted on godaddy.com. I have set up the domain and can see it in my DNS list. The servers that are supposed to be setup are ns51.domaincontrol.com and ns52.domaincontrol.com, however my registration is bouncing saying that there are "No Nameservers found for {my new domain}".

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

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

发布评论

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

评论(5

尬尬 2024-08-10 19:44:31

我认为这是列出您的域名服务器的最短且最快命令:

host -t ns yourdomain.com

I think this is the shortest and quickest command to list your nameservers:

host -t ns yourdomain.com
似狗非友 2024-08-10 19:44:31

如果您使用的是 Mac 或 Unix 计算机,您可以从命令行执行以下操作:

whois site.com

最后它应该为您提供 DNS 服务器列表。

您可以使用以下命令过滤列表,仅显示名称服务器信息:

whois site.com | grep "Name S"

请注意,www.site.com 和 site.com 是两个不同的端点,您需要为它们进行适当的设置。

If you're on a Mac or Unix machine you can do the following from command line:

whois site.com

Toward the end it should give you a list of DNS servers.

You can filter the list, showing only the Name Server information, with:

whois site.com | grep "Name S"

Note that www.site.com and site.com are two different end points and you need to set up appropriately for both of them.

黎歌 2024-08-10 19:44:31

Zonecheck 是一款免费软件,可以从命令行运行:

% zonecheck stackoverflow.com
ZONE  : stackoverflow.com.
NS <= : ns51.domaincontrol.com. [216.69.185.26]
NS    : ns52.domaincontrol.com. [208.109.255.26]

       _______________
     ,---------------.|
~~~~ |    warning    || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     `---------------'
w> Nameservers are all part of the same AS
 | Adv: ZoneCheck
 |   To avoid loosing all connectivity with the authoritative DNS in case
 | of a routing problem inside your Autonomous System, it is advised to
 | host the DNS on different AS.
 `----- -- -- - -  -
 :   All the nameservers are part of the same Autonomous System (AS number
 : 26496), try to have some of them hosted on another AS.
 `..... .. .. . .  .
=> generic

==> SUCCESS (but 1 warning(s))

Zonecheck is a free software and can be run from the command line:

% zonecheck stackoverflow.com
ZONE  : stackoverflow.com.
NS <= : ns51.domaincontrol.com. [216.69.185.26]
NS    : ns52.domaincontrol.com. [208.109.255.26]

       _______________
     ,---------------.|
~~~~ |    warning    || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     `---------------'
w> Nameservers are all part of the same AS
 | Adv: ZoneCheck
 |   To avoid loosing all connectivity with the authoritative DNS in case
 | of a routing problem inside your Autonomous System, it is advised to
 | host the DNS on different AS.
 `----- -- -- - -  -
 :   All the nameservers are part of the same Autonomous System (AS number
 : 26496), try to have some of them hosted on another AS.
 `..... .. .. . .  .
=> generic

==> SUCCESS (but 1 warning(s))

╰沐子 2024-08-10 19:44:31

有一个内置命令行:nslookup

提交它,然后编写 set type=ANY 并按 Enter。之后指定所需的域,您将获得您正在寻找的内容。或者,输入 ? 并查看 nslookup 命令行的更多选项。

PS:虽然这个答案有延迟,但希望它对其他想要从命令行检查名称服务器/DNS 设置的人有用。

There is a built-in command line for that: nslookup

Submit it, then write set type=ANY and press enter. After which specify desired domain and you'll get what you are looking for. Alternatively, enter ? and see more options for the nslookup command line.

PS: while this answer comes with a delay, hope it to be useful for others who want to check nameserver/DNS setup from command line.

十六岁半 2024-08-10 19:44:31

从命令行运行 nm-tool 将为您提供大量信息,其中最重要的是您正在使用的 DNS 服务器。您可能必须安装它,但许多发行版都包含它。

nm-tool run from the command line will give you much information, not the least of which is the DNS servers you're using. You may have to install this, but many distros have it included.

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