特定域名dnslog.cn被异常解析为127.0.0.1的问题排查及求助
特定域名dnslog.cn被异常解析为127.0.0.1的问题排查及求助
大家好,我遇到了一个非常诡异的DNS问题,想请教下各位大佬:
不管切换哪个公共DNS服务器,dnslog.cn都会被解析到127.0.0.1,甚至本地localhost上的服务都能通过http://dnslog.cn访问到。这个问题在Windows原生Firefox和WSL2里的Firefox上表现一致,说明不是WSL特有的问题。我用的是Windows 11系统,下面是我在WSL2里做的调试命令输出:
1. nslookup 执行结果
❯ nslookup dnslog.cn Server: 172.23.176.1 Address: 172.23.176.1#53 Non-authoritative answer: Name: dnslog.cn Address: 127.0.0.1 ** server can't find dnslog.cn: SERVFAIL
2. dig 执行结果
❯ dig dnslog.cn ; <<>> DiG 9.18.12-1-Debian <<>> dnslog.cn ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6112 ;; flags: qr rd ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;dnslog.cn. IN A ;; ANSWER SECTION: dnslog.cn. 0 IN A 127.0.0.1 ;; Query time: 29 msec ;; SERVER: 172.23.176.1#53(172.23.176.1) (UDP) ;; WHEN: Sat Mar 18 05:52:42 IST 2023 ;; MSG SIZE rcvd: 52
3. ping 执行结果
❯ ping dnslog.cn PING dnslog.cn (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.021 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.013 ms 64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.018 ms 64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.023 ms 64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.026 ms ^C --- dnslog.cn ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4183ms rtt min/avg/max/mdev = 0.013/0.020/0.026/0.004 ms
4. traceroute 执行结果
❯ traceroute dnslog.cn traceroute to dnslog.cn (127.0.0.1), 30 hops max, 60 byte packets 1 localhost (127.0.0.1) 0.075 ms 0.027 ms 0.004 ms
我检查了WSL2里的resolv.conf、hosts和nsswitch.conf,看起来都没有异常:
resolv.conf 内容
❯ cat /etc/resolv.conf # This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf: # [network] # generateResolvConf = false nameserver 172.23.176.1
hosts 内容
❯ cat /etc/hosts # This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf: # [network] # generateHosts = false 127.0.0.1 localhost 127.0.1.1 MyPCName. MyPCName 192.168.0.103 host.docker.internal 192.168.0.103 gateway.docker.internal 127.0.0.1 kubernetes.docker.internal # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
补充几个关键信息:
- 同一个网络里的其他设备访问
dnslog.cn完全正常 - 我本机挂VPN之后,这个问题就消失了
本来以为是我自己的配置问题,但后来发现包括谷歌DNS在内的部分公共DNS都会把这个域名解析到127.0.0.1,只有Cloudflare DNS能正常解析。现在我想知道:
- 为什么只有这个特定域名会被异常解析?
- 这种DNS不一致的问题应该去哪里反馈呢?
备注:内容来源于stack exchange,提问作者Anutrix
相关产品推荐
相关产品推荐

