获取 NXDOMAIN,但更详细的主机查找正在运行

获取 NXDOMAIN,但更详细的主机查找正在运行

我无法通过 SSH 登录服务器:

ssh: Could not resolve hostname apex.swiftinit.org: Name or service not known

我得到了同样的错误dig

$ dig +tcp apex.swiftinit.org CNAME

; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> +tcp apex.swiftinit.org CNAME
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 54807
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;apex.swiftinit.org.        IN  CNAME

;; AUTHORITY SECTION:
swiftinit.org.      2368    IN  SOA dns1.registrar-servers.com. hostmaster.registrar-servers.com. 1710114605 43200 3600 604800 3601

;; Query time: 28 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (TCP)
;; WHEN: Sun Mar 10 19:11:29 CDT 2024
;; MSG SIZE  rcvd: 120

但是,如果我指定权威名称服务器,DNS查找就会成功:

$ dig +tcp @dns1.registrar-servers.com apex.swiftinit.org CNAME

; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> +tcp @dns1.registrar-servers.com apex.swiftinit.org CNAME
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3179
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;apex.swiftinit.org.        IN  CNAME

;; ANSWER SECTION:
apex.swiftinit.org. 1799    IN  CNAME   swiftinit-lb-e810d5e23487605d.elb.us-east-1.amazonaws.com.

;; Query time: 76 msec
;; SERVER: 156.154.132.200#53(dns1.registrar-servers.com) (TCP)
;; WHEN: Sun Mar 10 19:12:32 CDT 2024
;; MSG SIZE  rcvd: 107

我尝试清除本地 DNS 缓存,但sudo resolvectl flush-caches对结果没有影响。

如果有帮助的话,UDP 上的 DNS 是不是由于某种原因而工作:

$ dig @dns1.registrar-servers.com apex.swiftinit.org CNAME

; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> @dns1.registrar-servers.com apex.swiftinit.org CNAME
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 10116
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;apex.swiftinit.org.        IN  CNAME

;; AUTHORITY SECTION:
swiftinit.org.      2160    IN  SOA dns1.registrar-servers.com. hostmaster.registrar-servers.com. 1710114605 43200 3600 604800 3601

;; Query time: 24 msec
;; SERVER: 156.154.132.200#53(dns1.registrar-servers.com) (UDP)
;; WHEN: Sun Mar 10 19:14:57 CDT 2024
;; MSG SIZE  rcvd: 109

我可能做错了什么?

相关内容