# 路由器 dns 污染

**URL:** <https://meta.appinn.net/t/topic/45330>\
**Category:** 问题求助\
**Created:** [2023 年7 月 8 日 09:52 UTC](https://meta.appinn.net/t/topic/45330 "2023-07-08T09:52:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

作者： ![rtrobin](https://meta-edge.appinn.com/user_avatar/meta.appinn.net/rtrobin/32/24942_2.png) [@rtrobin](https://meta.appinn.net/u/rtrobin)\
发布日期： [2023 年7 月 8 日 09:52 UTC](https://meta.appinn.net/t/topic/45330/1 "2023-07-08T09:52:08Z")

</div>

背景：有个很多年前的小路由器 newifi mini，刷了 padavan，现在作为AP接入到运营商的光猫上。想在 newifi 路由器上挂些脚本，做些自用的提醒 bot。

遇到的问题：在路由器上 ping [github.com](http://github.com) ，发现被 direct 到 127.0.0.1 ，大概率怀疑应该是运营商的 dns 污染。直接在路由器的 dns 页面，设置了 dnspod 和 google 的 dns 地址。但是似乎没有生效，而且通过 nslookup 命令看，似乎也无法定位到正确的地址。

PC 上有科学工具，这小路由器上不想搞那么重的工具，除了直接修改 hosts ，请教下是否还有其他方法解决该问题？谢谢

```auto
[newifi /opt/home/admin]# ping github.com
PING github.com (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.321 ms
64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.236 ms
64 bytes from 127.0.0.1: seq=2 ttl=64 time=0.216 ms
64 bytes from 127.0.0.1: seq=3 ttl=64 time=0.217 ms
64 bytes from 127.0.0.1: seq=4 ttl=64 time=0.217 ms
^C
--- github.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.216/0.241/0.321 ms
[newifi /opt/home/admin]# nslookup github.com
Server: 119.29.29.29
Address 1: 119.29.29.29 pdns.dnspod.cn

Name: github.com
Address 1: 127.0.0.1 localhost.localdomain
[newifi /opt/home/admin]# nslookup github.com 8.8.8.8
Server: 8.8.8.8
Address 1: 8.8.8.8 dns.google

Name: github.com
Address 1: 127.0.0.1 localhost.localdomain

```

---

<div class="post-metadata">

作者： ![Dalieba](https://meta-edge.appinn.com/user_avatar/meta.appinn.net/dalieba/32/3804_2.png) [@Dalieba](https://meta.appinn.net/u/Dalieba)\
发布日期： [2023 年7 月 8 日 13:31 UTC](https://meta.appinn.net/t/topic/45330/2 "2023-07-08T13:31:40Z")

</div>

寻找那些专治 DNS 污染的软件

---

<div class="post-metadata">

作者： ![SomeoneAtAppinn](https://meta-edge.appinn.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@SomeoneAtAppinn](https://meta.appinn.net/u/SomeoneAtAppinn)\
发布日期： [2023 年7 月 9 日 01:39 UTC](https://meta.appinn.net/t/topic/45330/3 "2023-07-09T01:39:43Z")

</div>

dnspod同样会返回被污染的结果，阿里DNS也会。网上文章里那些所谓的国内抗污染DNS，实际上只有几所大学的是真的有一定程度的抗污染能力，随着形势收紧也在削减对外服务。还有一些是个人非公开的服务，仅作小范围分享的，通常不会被这些文章收录。  
Google的在劫持列表里，绝大多数情况下通过UDP53查询都会被运营商劫持，其他方式连接则会被阻断。  
所以极有可能并非DNS设置没有生效，而是明文查询在目前的网络环境里几乎不具备任何抗污染能力。此外也有可能你仅设置了IPv4的DNS，但忘了还使用了IPv6优先。

还是专门配置一个DNS软件吧，逻辑可以是 中国DNS优先-\>如果结果包含本地环回、Facebook、Twitter的IP，那么使用小众的DNS服务或通过代理使用远程DNS查询，但这样会因为首先受用中国DNS而有泄露问题；或者 前置中国已知域名走中国DNS+海外DNS优先-\>如果海外DNS返回的结果包含中国IP，则利用中国DNS再次解析以达到最好效果，启用DNS缓存，这样的话，会有国内大厂服务新增域名若同时提供海外服务，可能因未被中国域名规则覆盖而解析到海外IP的潜在风险。

---

<div class="post-metadata">

作者： ![RachelSherman](https://meta-edge.appinn.com/letter_avatar_proxy/v4/letter/r/74df32/32.png) [@RachelSherman](https://meta.appinn.net/u/RachelSherman)\
发布日期： [2023 年7 月 9 日 06:49 UTC](https://meta.appinn.net/t/topic/45330/4 "2023-07-09T06:49:39Z")

</div>

设置doh，可能需要某些dns服务
