找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 6356|回复: 63

[N1盒子] N1盒子安装dnsmasq,实现斐讯网址劫持

  [复制链接]
发表于 2019-7-3 20:35 | 显示全部楼层 |阅读模式
很多路由器官方固件不支持dns劫持(说的就是你,打人硕),路由器作为智能家庭入口,安全和稳定最重要,还是不刷非官方系统。
刚好N1盒子作为家庭智能硬件服务器,需要常开;可以给N1安装dns服务器,实现本地解析,不光能实现dns劫持,还能提高网络访问速度。
我用的版本是armbian5.88-linux-desktop版本.比较新的ubuntu系统已经内置了network manager,自带dns服务器功能,安装包是dnsmasq-base。但nm比较难用,功能上也没有dnsmasq强大。以下是dnsmasq安装启动的过程:
1.停止默认的dns解析服务
  1. sudo systemctl stop systemd-resolved.service
复制代码
  1. sudo systemctl disable systemd-resolved.service
复制代码

2.安装dnsmasq
  1. sudo apt-get install dnsmasq -y
复制代码


3.设置dnsmasq开机启动
  1. sudo systemctl  enable dnsmasq.service
复制代码


4.修改/etc/resolve.conf
nameserver 127.0.0.1
其余删除或注释掉
5.修改dnsmasq.conf
listen-address=127.0.0.1
listen-address=192.168.*.* //内网地址
no-hosts //使默认hosts文件失效
no-resolv //使默认resolv文件失效
strict-order //严格按nameserver顺序解析
no-poll
server=114.114.114.114
server=8.8.8.8
address=/phicomm.com/192.168.*.*  //智能硬件服务器地址,如果也装在N1上就填本地地址
网上dnsmasq设置的帮助很多,我这里的是很简单的,dnsmasq还可以实现屏蔽广告等功能,这里就不多说了。
6.启动dnsmasq
  1. sudo systemctl start dnsmasq.service
复制代码


7.设置路由器
在路由器的dhcp设置界面,设置dns服务器为N1的地址
8.测试
ping 一下 a.phicomm.com ,ip显示为智能硬件服务器地址即为成功。
可以dig 一下 baidu.com ,第二次dig显示解析时间为0ms,就说明解析服务器到了本地。

以上即为方法,大家enjoy!
我的恩山、我的无线 The best wifi forum is right here.
发表于 2019-7-3 20:42 | 显示全部楼层
学习新东西
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 22:08 | 显示全部楼层
盒子安装dnsmasq,实现斐讯网址劫
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 22:10 | 显示全部楼层
学习学习哈
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 22:25 | 显示全部楼层
感谢兄弟分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 22:27 | 显示全部楼层
如果您要查看本帖隐藏内容请回复
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 22:58 | 显示全部楼层
盒子安装dnsmasq,实现斐讯网址劫
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-4 02:47 来自手机 | 显示全部楼层
看看是什么....
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-4 08:58 | 显示全部楼层
感谢分享,值得学习
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-4 14:59 | 显示全部楼层
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-4 15:57 | 显示全部楼层

学习学习哈
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-4 16:05 来自手机 | 显示全部楼层
最近都在玩DC1
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-11 12:42 | 显示全部楼层
支持一下先
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-11 13:25 | 显示全部楼层
看看,谢谢了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-11 13:29 | 显示全部楼层
Mark:N1盒子安装dnsmasq,实现斐讯网址劫持
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-24 09:01

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表