您的位置:首页 > 其它

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会被覆盖掉
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: