如何调试DNS名称解析?(nslookup 有效,但 telnet 无效)

Ian*_*oyd 10 networking windows dns windows-7 ipv6

我正在尝试连接到一个网站:

http://superuser.com.sixxs.org
Run Code Online (Sandbox Code Playgroud)

我可以ping地址:

C:\Users\Ian>ping /6 superuser.com.sixxs.org

Pinging ipv6.nginx.sixxs.net [2001:838:2:1::30:67] with 32 bytes of data:
Reply from 2001:838:2:1::30:67: time=257ms
Reply from 2001:838:2:1::30:67: time=176ms
Reply from 2001:838:2:1::30:67: time=161ms
Reply from 2001:838:2:1::30:67: time=164ms

Ping statistics for 2001:838:2:1::30:67:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 161ms, Maximum = 257ms, Average = 189ms
Run Code Online (Sandbox Code Playgroud)

但都没有ping

C:\Users\Ian>ping supersuer.com.sixxs.org
Ping request could not find host supersuer.com.sixxs.org.
  Please check the name and try again.
Run Code Online (Sandbox Code Playgroud)

但我无法浏览它(在Chromeie 中):

在此处输入图片说明

我也不能telnet到它

C:\Users\Ian>telnet superuser.com.sixxs.org 80
Connecting To superuser.com.sixxs.org...Could not open connection to the host,
  on port 80: Connect failed
Run Code Online (Sandbox Code Playgroud)

但是nslookup解析名称很好,有权限记录和一切!

首先我们刷新 dns,以防万一有人想表明这是由于 dns 缓存:

C:\Users\Ian>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.
Run Code Online (Sandbox Code Playgroud)

现在回到查找:

C:\Users\Ian>nslookup superuser.com.sixxs.org
Server:  solo.avatopia.com
Address:  10.0.0.98

Non-authoritative answer:
Name:    ipv6.nginx.sixxs.net
Addresses:  2001:838:2:1:2a0:24ff:feab:3b53
          2001:960:800::2
          2001:1af8:4050::2
          2620:0:6b0:a:250:56ff:fe99:78f7
          2001:838:2:1::30:67
Aliases:  superuser.com.sixxs.org
Run Code Online (Sandbox Code Playgroud)

所有这些地址都有效:

  • 我可以ping他们
  • 我可以telnet在它们上端口 80
  • 我可以在Chrome(例如http://[2001:838:2:1::30:67])中浏览它们

我手动调用 Windows API 函数 GetAddrInfo时,该名称甚至会解析。

为什么我怎么能诊断一下pingtelnetChromeInternet Explorer做错了?

注意:Wireshark 现在很有用,因为 dns 服务器 ( solo.avatopia.com) 位于加密的 vpn 链接的另一端;WireShark 拒绝解密加密的 VPN 流量。

Thi*_*his 2

DNS 解析并不自动意味着 HTTP 可达性;就您而言,这实际上是问题的一部分。

sixxs.org使用to回答所有DNS 查询。例如,显然不可能是真实的站点,因为没有顶级域。CNAMEipv6.nginx.sixxs.netiamugly

[mpenning@Bucksnort ~]$ dig +short iamugly.sixxs.org
ipv6.nginx.sixxs.net.
[mpenning@Bucksnort ~]$ dig +short google.com.sixxs.org
ipv6.nginx.sixxs.net.
[mpenning@Bucksnort ~]$ dig google.com.sixxs.org

; <<>> DiG 9.7.3 <<>> google.com.sixxs.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22229
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com.sixxs.org.          IN      A

;; ANSWER SECTION:
google.com.sixxs.org.   3553    IN      CNAME   ipv6.nginx.sixxs.net.

;; AUTHORITY SECTION:
sixxs.net.              3316    IN      SOA     ns.paphosting.net. hostmaster.sixxs.net. 2012010601 86400 7200 1209600 86400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon May 28 15:39:58 2012
;; MSG SIZE  rcvd: 133

[mpenning@Bucksnort ~]$
Run Code Online (Sandbox Code Playgroud)

ipv6.nginx.sixxs.net只是一个转发流量的 HTTP 代理,因此只要他们的代理启动,它就可以 ping 通,您就可以telnet...

[mpenning@Bucksnort ~]$ telnet superuser.com.sixxs.org 80
Trying 2620:0:6b0:a:250:56ff:fe99:78f7...
Connected to ipv6.nginx.sixxs.net.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
[mpenning@Bucksnort ~]$
Run Code Online (Sandbox Code Playgroud)

在您转到 后superuser.com.sixxs.orgsixxs.net将您重定向到ipv6gate.sixxs.net,他们重写超级用户的 html 内容,通过 发送页面上的所有链接foo.sixxs.org

在此输入图像描述

有些东西阻止您通过sixxs.org,它可能来自您路径中其他地方的 VPN 服务器、防火墙或透明 http 代理。