zoukankan      html  css  js  c++  java
  • dnsmasq possible DNS-rebind attack detected错误

    最近在做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会被覆盖掉

  • 相关阅读:
    背景透明度IE兼容性代码
    酷站收藏
    洛谷P1142 轰炸 数学
    洛谷P1282 多米诺骨牌
    洛谷P1247 取火柴游戏 数学题 博弈论
    洛谷P1135 奇怪的电梯 广搜
    洛谷P1077 摆花 动态规划
    洛谷P1161 开灯 数学
    洛谷P1154 奶牛分厩 数学
    洛谷P2147 [SDOI2008]Cave 洞穴勘测 Link-Cut Tree LCT
  • 原文地址:https://www.cnblogs.com/chenxuelian/p/4813718.html
Copyright © 2011-2022 走看看