免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 8391 | 回复: 5
打印 上一主题 下一主题

[DNS] named优化及安全设定,参阅bind.com [复制链接]

论坛徽章:
4
IT运维版块每日发帖之星
日期:2015-09-01 06:20:00IT运维版块每日发帖之星
日期:2015-10-09 06:20:00操作系统版块每日发帖之星
日期:2015-10-20 06:20:00IT运维版块每日发帖之星
日期:2015-11-03 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-21 22:52 |只看该作者 |倒序浏览
#isc bind named.conf
acl "xjip" { 192.168.4.0/24; 192.168.7.0/24; 218.0.0.0/8; 222.0.0.0/8; 222.0.0.0/8;  };
options {
acl "hacker" { 0.0.0.0/7; 2.0.0.0/8; 5.0.0.0/8; 7.0.0.0/8; 23.0.0.0/8; 27.0.0.0/8; 31.0.0.0/8; 36.0.0.0/7; 39.0.0.0/8; 41.0.0.0/8; 42.0.0.0/8; 223.0.0.0/8; 240.0.0.0/4; };
version named ;
listen-on { 218.84.9.1; };           //在当前接口上运行named,默认端口为53
listen-on-v6 { none; };                  //禁用ipv6支持
zone-statistics yes;
statistics-file "/var/named/named.stats";
auth-nxdomain yes;                 //验证nx域名
max-cache-size 32M;                 //最大的缓存大小为32MB
tcp-clients 256;         //最大的客户端为256个
recursive-clients 4000;            //服务器同时为用户执行的递归查询的最大数量 为4000
interface-interval 0;       //启动named时才检查监听的网络接口
cleaning-interval 480;  //每隔480分钟将统计日志写入文件
lame-ttl 1800;                         //设定缓存有问题服务器指示的秒数为30分钟
max-ncache-ttl 166000;       //为降低网络流量和提升服务器存储否定回答的性能
max-cache-ttl 86400;       //设定了服务器储存普通(肯定)答案的最大时间
directory "/etc/namedb";
pid-file "named.pid";
allow-query { "lan"; };  //已定义的ACL
blackhole { hacker; };     //设定一个地址列表,服务器将不会接收来自这个列表的查询请求
allow-transfer { xjip; };           //允许递归解析的IP
recursion no;                        //开启递归
};


view "internal-in" in {
        match-clients { xjip; };
        recursion yes;
        additional-from-auth yes;
        additional-from-cache yes;

view "external" in {
        match-clients { any; };
        recursion no;
        additional-from-auth no;
        additional-from-cache no;

论坛徽章:
0
2 [报告]
发表于 2008-12-22 09:28 |只看该作者
max-ncache-ttl 166000;       //为降低网络流量和提升服务器存储否定回答的性能
max-cache-ttl 86400;       //设定了服务器储存普通(肯定)答案的最大时间

这些设定将导致修改域名记录后生效缓慢。

论坛徽章:
0
3 [报告]
发表于 2009-03-20 10:41 |只看该作者
recursion no;                        //开启递归

设为no是开启递归吗?是我理解错误还是作者笔误?

论坛徽章:
0
4 [报告]
发表于 2009-03-25 20:23 |只看该作者

回复 #4 yiweiyiwei 的帖子

作者笔误了。

论坛徽章:
6
丑牛
日期:2013-09-17 00:18:40未羊
日期:2013-10-31 12:10:47午马
日期:2013-12-07 01:58:50水瓶座
日期:2013-12-24 22:43:12水瓶座
日期:2014-03-15 21:12:13操作系统版块每日发帖之星
日期:2016-08-07 06:20:00
5 [报告]
发表于 2009-03-26 08:37 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP