跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 大佬帮看下为什么网站加上 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'

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.