dnsmasq possible DNS-rebind attack detected错误
2015-09-16 16:34
633 查看
最近在做openwrt的平台,dns使用的是dnsmasq,但是通过板子上网,将PC的dns设置成板子的时候,发现百度等都可以,但是公司邮箱打不开。公司邮箱的域名
xx-xx-notes.xxx.com.cn的形式,于是把dnsmasq的log打开看了下。终于找到问题所在。
打开dnsmasq log的方法
1. 找到/etc/dnsmasq.conf
在openwrt系统中,dnsmasq.conf是由/etc/init.d/dnsmasq文件生成的,生成的方法是读取/etc/config/dhcp下面的配置,然后加上dns的一些配置,形成dnsmasq.conf.
所以要修改也要在/etc/init.d/dnsmasq里面修改,而不是直接修改/etc/dnsmasq.conf
在文件的尾部加上log配置
log-queries
log-facility=/var/log/dnsmasq.log
2. 重启dnsmasq
/etc/init.d/dnsmasq restart
3. ping xx-xx-notes.xxx.com.cn
4. 查看var/log/dnsmasq.log文件,看ping的结果
发现 dnsmasq possible DNS-rebind attack detected:
5. 解决问题
百度发现如果在dnsmasq.conf中加上 “stop-dns-rebind” 就可能导致这个问题,去掉这个选项,重启就好了。去掉这个选项是在/etc/config/dhcp里面,修改
option rebind_protection ‘0’
直接修改dnsmasq.conf会被覆盖掉
xx-xx-notes.xxx.com.cn的形式,于是把dnsmasq的log打开看了下。终于找到问题所在。
打开dnsmasq log的方法
1. 找到/etc/dnsmasq.conf
在openwrt系统中,dnsmasq.conf是由/etc/init.d/dnsmasq文件生成的,生成的方法是读取/etc/config/dhcp下面的配置,然后加上dns的一些配置,形成dnsmasq.conf.
所以要修改也要在/etc/init.d/dnsmasq里面修改,而不是直接修改/etc/dnsmasq.conf
在文件的尾部加上log配置
log-queries
log-facility=/var/log/dnsmasq.log
2. 重启dnsmasq
/etc/init.d/dnsmasq restart
3. ping xx-xx-notes.xxx.com.cn
4. 查看var/log/dnsmasq.log文件,看ping的结果
发现 dnsmasq possible DNS-rebind attack detected:
5. 解决问题
百度发现如果在dnsmasq.conf中加上 “stop-dns-rebind” 就可能导致这个问题,去掉这个选项,重启就好了。去掉这个选项是在/etc/config/dhcp里面,修改
option rebind_protection ‘0’
直接修改dnsmasq.conf会被覆盖掉
相关文章推荐
- Python改回之前版本的方法
- Docker使用
- VS2012(X64)+PCL1.7.2+Kinect SDK1.8+OpenCV2.4
- 从最大似然到EM算法浅解
- Linux线程简单介绍
- 【Tomcat】eclipse运行Bootstrap启动tomcat,免插件配置
- LeetCode 226----Invert Binary Tree
- Session的生命周期
- 如何使用集成了ESP8266芯片的NodeMCU以配置一个可交互的TCP服务器?
- asp.net自定义控件之加载层
- 查询某个字段不在查询结果中的记录
- jsp初体验
- 系统安装SQL Sever2000后1433端口未开放,如何打开1433端口的解决方法
- setImageResource和setImageDrawable区别
- SpringMVC+MyBatis - 12 spring mvc4返回的json日期为Long的解决方案
- HDU 2896 病毒侵袭(AC自动机)
- 精妙的单片机非阻塞延时程序设计
- 华为机试和尚挑水
- org.dom4j.DocumentException: null Nested exception: null解决方法
- vim 编辑器的常见使用命令