iStoreOS(旁路由)使用openclash实现dns劫持

本页内容

iStoreOS(旁路由)使用openclash实现dns劫持

背景

我主要介绍通过openwrt中的openclash覆写hosts实现dns劫持的方法。

操作

  1. 进入openwrt后台,进入openclash,进入覆写设置,进入dns设置
    openclash

  2. 勾选hosts,并写入hosts信息,10.10.10.6是内网nas的ip地址,你可以改成任意的IP

1'nas.com': 10.10.10.6
2'*.nas.com': 10.10.10.6

openclash
3. 保存并应用 openclash

  1. 测试
1ping nas.com
2ping www.nas.com

openclash

总结

openclash实现dns劫持的方法非常简单,只需要在openclash中配置hosts即可。