Bind关闭递归查询

原文地址:http://ycsk.iteye.com/blog/1220411

观察DNS查询日志发现一个非本地提供服务的ZONE查询,开始采取iptables禁止掉此IP,第二天又有另一IP对此ZONE查询,看来得从根本上解决这个问题。 
我的bind起初设置 
引用
allow-recursion         { any; };
允许递归查询 

更改配置 
方法一: 
在options中设置 
引用
recursion               yes;

在view中设置 
引用
allow-recursion         { none; };


方法二: 
在options中设置 
引用
recursion               no;


这时Bind变成迭代查询,返回根DNS信息。 

引用

If recursion is set to 'yes' (the default) the server will always provide recursive query behaviour if requested by the client (resolver). If set to 'no' the server will only provide iterative query behaviour - normally resulting in a referral. If the answer to the query already exists in the cache it will be returned irrespective of the value of this statement. This statement essentially controls caching behaviour in the server. The allow-recursion statement and the view clauses can provide fine-grained control. This statement may be used in a view or a global options clause. 


http://www.zytrax.com/books/dns/ch7/queries.html 

最后记得重新加载配置并清除缓存 
引用

  reload        Reload configuration file and zones. 
  reload zone [class [view]] 
                Reload a single zone. 
  flush         Flushes all of the server's caches. 
  flush [view]  Flushes the server's cache for a view. 


/byread/bin/bind/sbin/rndc reload 
/byread/bin/bind/sbin/rndc flush


  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值