跳转到内容
彼岸论坛
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 大佬帮看下为什么网站加上 www 后 dns 就无响应了


小天管理

已推荐帖子

网站是 okx (www.okx.com), 而且目前只发现 okx 有问题,浏览器打开会秒响应 DNS_PROBE_FINISHED_NXDOMAIN

下面是我本地的一些测试:


➜  ~ nslookup www.baidu.com
Server:		2408:8215:f29:16f0::1
Address:	2408:8215:f29:16f0::1#53

www.baidu.com	canonical name = www.a.shifen.com.
Name:	www.a.shifen.com
Address: 110.242.68.4
Name:	www.a.shifen.com
Address: 110.242.68.3

➜  ~ nslookup www.okx.com
Server:		2408:8215:f29:16f0::1
Address:	2408:8215:f29:16f0::1#53

*** Can't find www.okx.com: No answer

➜  ~ nslookup okx.com
Server:		2408:8215:f29:16f0::1
Address:	2408:8215:f29:16f0::1#53

Name:	okx.com
Address: 43.198.216.245
Name:	okx.com
Address: 16.163.134.231
Name:	okx.com
Address: 43.199.123.175

➜  ~ curl okx.com
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
</body>
</html>
➜  ~ curl https://okx.com
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
</body>
</html>
➜  ~ curl https://www.okx.com
curl: (6) Could not resolve host: www.okx.com

家里所有设备打开这个 okx 都是秒拒。

OpenWrt 作为软路由,它负责拨号上网,并且里面跑着 openclash ,dns 是 Dnsmasq 。

连接 OpenWrt 的是路由器,作为中继充当无线交换机。

我尝试过关闭 openclash ,网站还是一样打不开。

在 OpenWrt 中调试:

$ nslookup www.okx.com
Server:		127.0.0.1
Address:	127.0.0.1:53




# root @ OpenWrt in ~ [9:41:51]
$ nslookup www.baidu.com
Server:		127.0.0.1
Address:	127.0.0.1:53


www.baidu.com	canonical name = www.a.shifen.com
Name:	www.a.shifen.com
Address: 110.242.68.3
Name:	www.a.shifen.com
Address: 110.242.68.4


# root @ OpenWrt in ~ [9:42:03]
$ nslookup okx.com
Server:		127.0.0.1
Address:	127.0.0.1:53

Name:	okx.com
Address: 16.163.134.231
Name:	okx.com
Address: 43.199.123.175
Name:	okx.com
Address: 43.198.216.245

okx 只要是加上 www 后就无法获取到 ip 地址了。

另外也重启过很多次 Dnsmasq (/etc/init.d/dnsmasq restart), 都没效果。

hosts 文件也没问题:

$ cat /etc/hosts
127.0.0.1 localhost

::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

目前来看,和 OpenClash 关系不大,因为请求就没有走到 OC 里面。

下面是配置项:

$ cat /etc/config/dhcp
config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option filter_aaaa '0'
	option filter_a '0'
	option localuse '1'
	option port '53'
	list server '127.0.0.1#7874'
	option noresolv '1'
	option cachesize '0'
意见的链接
分享到其他网站

加入讨论

您现在可以发表并稍后注册. 如果您是会员,请现在登录来参与讨论.

游客
回复主题...

×   粘贴为富文本.   粘贴为纯文本来代替

  只允许使用75个表情符号.

×   您的链接已自动嵌入.   显示为链接来代替

×   您之前的内容已恢复.   清除编辑器

×   您无法直接粘贴图片.要从网址上传或插入图片.

  • 游客注册

    游客注册

  • 会员

  • 最新的状态更新

    没有最新的状态更新
  • 最近查看

    • 没有会员查看此页面.
×
×
  • 创建新的...