DNS服务器上的NS记录不匹配 [英] Mismatched NS records at DNS server

查看:110
本文介绍了DNS服务器上的NS记录不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在DNS名称服务器配置和DNS NS记录不一致方面遇到一些问题.

I have some problems with DNS nameserver configuration and DNS NS records being inconsistent.

例如域名zzpeter.nl:
whois zzpeter.nl 时的域名服务器是dns1.movenext.nl和dns2.movenext.net.
但是,当执行 dig ns zzpeter.nl 时,它将返回ns1.undeveloped.com和ns2.undeveloped.com.

For example the domain name zzpeter.nl:
It's nameservers when doing a whois zzpeter.nl are dns1.movenext.nl and dns2.movenext.net.
But when doing a dig ns zzpeter.nl it returns ns1.undeveloped.com and ns2.undeveloped.com.

您真的可以看到在执行 dig + trace ns zzpeter.nl 时发生了什么:

You can really see what's happening when doing a dig +trace ns zzpeter.nl:

; <<>> DiG 9.8.3-P1 <<>> +trace ns zzpeter.nl
;; global options: +cmd
.           9078    IN  NS  e.root-servers.net.
.           9078    IN  NS  g.root-servers.net.
.           9078    IN  NS  d.root-servers.net.
.           9078    IN  NS  m.root-servers.net.
.           9078    IN  NS  k.root-servers.net.
.           9078    IN  NS  j.root-servers.net.
.           9078    IN  NS  c.root-servers.net.
.           9078    IN  NS  l.root-servers.net.
.           9078    IN  NS  b.root-servers.net.
.           9078    IN  NS  f.root-servers.net.
.           9078    IN  NS  i.root-servers.net.
.           9078    IN  NS  a.root-servers.net.
.           9078    IN  NS  h.root-servers.net.
;; Received 228 bytes from 8.8.8.8#53(8.8.8.8) in 10 ms

nl.         172800  IN  NS  ns5.dns.nl.
nl.         172800  IN  NS  ns-nl.nic.fr.
nl.         172800  IN  NS  nl1.dnsnode.net.
nl.         172800  IN  NS  sns-pb.isc.org.
nl.         172800  IN  NS  ns4.dns.nl.
nl.         172800  IN  NS  ns2.dns.nl.
nl.         172800  IN  NS  ns3.dns.nl.
nl.         172800  IN  NS  ns1.dns.nl.
;; Received 485 bytes from 192.36.148.17#53(192.36.148.17) in 17 ms

zzpeter.nl.     7200    IN  NS  dns1.movenext.nl.
zzpeter.nl.     7200    IN  NS  dns2.movenext.net.
;; Received 103 bytes from 193.176.144.5#53(193.176.144.5) in 5 ms

zzpeter.nl.     3600    IN  NS  ns1.undeveloped.com.
zzpeter.nl.     3600    IN  NS  ns2.undeveloped.com.
;; Received 79 bytes from 80.247.175.10#53(80.247.175.10) in 2 ms

我可以从dig跟踪调用中获取已配置的名称服务器,并以人工的方式对其进行处理,但是还可以通过编程方式来检索在注册服务商处配置的名称服务器吗?

I can get the configured nameservers from a dig trace call and process them as a human, but is there also a way to retrieve the nameservers configured at the registrar in a way that I can process programmatically?

dig ns zzpeter.nl nslookup -type = ns zzpeter.nl host -t ns zzpeter.nl 均返回错误undeveloped.com名称服务器...

dig ns zzpeter.nl, nslookup -type=ns zzpeter.nl and host -t ns zzpeter.nl all return the incorrect undeveloped.com nameservers...

推荐答案

注册服务商/注册管理机构在其数据库中保留的内容不在DNS范围内,并且没有标准的获取方法.但是,您真正想到的并不是这个,而是在父区域中配置的名称服务器.您只需询问父区域的名称服务器即可获得这些名称.这正是 dig + trace 输出的倒数第二步中发生的情况.

What the registrar/registry keeps in its databases is outside DNS and there is no standard way to get at it. But what you're thinking of is not really that, but the name servers configured in the parent zone. Those you can simply get by asking the parent zone's name servers. This is exactly what happens in the dig +trace output's penultimate step.

查找父域名以查找任意域名并不像人们首先想到的那样简单.如果您不介意Perl,则可以在 Zonemaster 模块中找到用于挑选父级和子级名称服务器的代码.您可以从 CPAN Github .或者,您也可以像这样使用它:

Finding the parent zone for an arbitrary domain name is less straightforward than one may first think. If you don't mind Perl, you can find code that picks out parent- and child-side name servers in the Zonemaster modules. You can get those from CPAN or Github. Or you can just use it something like this:

perl -MZonemaster -E 'say for @{Zonemaster->zone("zzpeter.nl")->glue}'

这篇关于DNS服务器上的NS记录不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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