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会被覆盖掉

  • 相关阅读:
    Input file 调用相机
    C#读取txt文件
    高并发下获取随机字符串
    将Datatable转换为Json数据
    System.IO.Path 获得文件的后缀名
    用Js写的贪吃蛇游戏
    C#中的事件
    通过一个控制台小Demo--算术题,来展示C#基本的程序结构
    数据库高级应用之游标
    数据库高级应用之事务
  • 原文地址:https://www.cnblogs.com/chenxuelian/p/4813718.html
Copyright © 2011-2022 走看看