免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9692 | 回复: 1

[DNS] allow-query-cache与allow-recursion的区别? [复制链接]

论坛徽章:
0
发表于 2007-08-10 15:57 |显示全部楼层
在最近的BIND升级中,发现多了一个allow-query-cache,看ISC的文档描述如下:
2206.   [security]      "allow-query-cache" and "allow-recursion" now
                        cross inherit from each other.


                        If allow-query-cache is not set in named.conf then
                        allow-recursion is used if set, otherwise allow-query
                        is used if set, otherwise the default (localnets;
                        localhost is used.


                        If allow-recursion is not set in named.conf then
                        allow-query-cache is used if set, otherwise allow-query
                        is used if set, otherwise the default (localnets;
                        localhost is used.
感觉上allow-query-cache在未设置allow-recursion的情况下可以取代allow-recursion的功能,有继承关系,真不知道ISC这样做的目的是什么?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
发表于 2007-08-12 22:02 |显示全部楼层
allow-query-cache 和 allow-recursion 是有区别的:

在 BIND 9.4 中一个只提供授权域解析的服务器需要的Options配置如下:

options {
directory "/etc/namedb"; // Working directory
allow-query-cache { none; }; // Do not allow access to cache
allow-query { any; }; // This is the default
recursion no; // Do not provide recursive service =〉相当于 allow-recursion { none; };
};


如果仅按 9.3 版本的写法,Options的配置如下:

options {
directory "/etc/namedb"; // Working directory
allow-query { any; }; // This is the default
recursion no; // Do not provide recursive service =〉相当于 allow-recursion { none; };
};


再看 9.4 的文档中的 allow-recursion 的注释说明

allow-recursion Specifies which hosts are allowed to make recursive queries through this server. If not
specified, the default is to allow recursive queries from the builtin acls localnets and localhost.
Note that disallowing recursive queries for a host does not prevent the host from retrieving data
that is already in the server’s cache.


因此在 BIND 9.4 版本中,如果想禁止用户的递归查询请求,还需要将 allow-query-cache 选项关闭,否则用户仍然可能在 cache 中查到数据。

[ 本帖最后由 阿骁 于 2007-8-12 22:39 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP