源码配置bind主从时的注意事项-凯发app官方网站

凯发app官方网站-凯发k8官网下载客户端中心 | | 凯发app官方网站-凯发k8官网下载客户端中心
  • 博客访问: 537141
  • 博文数量: 48
  • 博客积分: 1249
  • 博客等级: 中尉
  • 技术积分: 1926
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-04 10:22
文章存档

2012年(3)

(45)

相关博文
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·

分类: linux

2011-12-15 03:15:41

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。

今天单位的dns重新构架,一台主的作主dns,二台从的作辅助dns,下面把配置的要求写下,以免在运维中的同志们走弯路和错路(抚琴煮酒),dns版本采用9.6-p1源码安装(处理问题的过程中得到了netseek的帮助,这里要特别感谢下)
这是在从dns上出现的问题一:
mar2616:04:17gdstnamed[18464]:client
115.207.47.199#20601:viewany:query(cache)'112.2.5.221.in-
addr.arpa/ptr/in'denied
mar2616:04:17gdstnamed[18464]:client
115.207.47.199#20602:viewany:query(cache)
'dx.3158.com.domain/a/in'denied
mar2616:04:17gdstnamed[18464]:client
115.207.47.199#20603:viewany:query(cache)
'dx.3158.com.domain/aaaa/in'denied
mar2616:04:17gdstnamed[18464]:client
115.207.47.199#20604:viewany:query(cache)'y163.net/a/in'
denied
mar2616:04:17gdstnamed[18464]:client
115.207.47.199#20605:viewany:query(cache)
'y163.net/aaaa/in'denied
mar2616:04:18gdstnamed[18464]:client
115.207.47.199#20606:viewany:query(cache)'112.2.5.221.in-
addr.arpa/ptr/in'denied
mar2616:04:18gdstnamed[18464]:client
115.207.47.199#20607:viewany:query(cache)
'dx.3158.com.domain/a/in'denied
mar2616:04:18gdstnamed[18464]:client
115.207.47.199#20608:viewany:query(cache)
'dx.3158.com.domain/aaaa/in'denied
mar2616:04:18gdstnamed[18464]:client
115.207.47.199#20609:viewany:query(cache)'y163.net/a/in'
denied
mar2616:04:19gdstnamed[18464]:client
115.207.47.199#20610:viewany:query(cache)
'y163.net/aaaa/in'denied
mar2616:04:19gdstnamed[18464]:client
115.207.47.199#20611:viewany:query(cache)'112.2.5.221.in-
addr.arpa/ptr/in'denied
mar2616:04:19gdstnamed[18464]:client
115.207.47.199#20612:viewany:query(cache)
'dx.3158.com.domain/a/in'denied
mar2616:04:19gdstnamed[18464]:client
115.207.47.199#20613:viewany:query(cache)
'dx.3158.com.domain/aaaa/in'denied
mar2616:04:19gdstnamed[18464]:client
115.207.47.199#20614:viewany:query(cache)'y163.net/a/in'
denied
mar2616:04:20gdstnamed[18464]:client
115.207.47.199#20615:viewany:query(cache)
'y163.net/aaaa/in'denied
mar2616:04:21gdstnamed[18464]:client
60.215.129.103#53455:viewany:query(cache)
''denied
mar2616:04:49gdstnamed[18464]:client
121.14.128.68#53455:viewchinanet:query(cache)
''denied
mar2616:04:59gdstnamed[18464]:client
221.171.1.147#53455:viewchinanet:query(cache)
''denie

发现新版的对cache的处理有所改变
新版本的bind对 allow-query 有着不同的处理,新增加了一个
allow-query-cache 的选项。
quote:allow-query specifies which hosts are allowed to ask
ordinary dns questions. allow-query may also
be specified in the zone statement, in which case it overrides the
options allow-query statement.
if not specified, the default is to allow queries from all hosts.

quote:allow-query-cache specifies which hosts are allowed to
get answers from the cache. the default is the
builtin acls localnets and localhost.
the way to set query access to the cache is now via allow-query-
cache. this differs from earlier
versions which used allow-query.
bind 9.4 的手册上还特别注释了
quote:allow-query-cache is now used to specify access to the
cache.
即在从dns的options里添加一条:
key "rndc-key" {
       algorithm hmac-md5;
       secret "rox3q 3f0gp8mkyqxx2zww==";
};
controls {
       inet 127.0.0.1 port 953
            allow { localhost; } keys { "rndc-key"; };
};
options {
version "9.8.12";
directory "/var/named";
pid-file "named.pid";
allow-query { any; }; //此处为添加
};

在维护cdn的bind的服务器时,有以下事项要注意:
一、如果主dns和从dns都是用root用户的,不需要考虑权限问题
,即/var/named写权限不需要更改任何地方,即不需要更改为named或给7权限;
二、多使用bind自带的rndc命令,这命令异常方便;配置时多用tail -f /var/log/messages,我就是系统日志来排错的;
三、如果测试bind时发现出现non-authoritative answer,意即非授权的回答,说明来自其他dns服务器或缓存;
四、辅dns服务器主要有两种主要用途,一是作为主ndns服务器的备份,二是分担主nds服务器的负载。区域传(zone transfer)是指辅dns从master dns服务器中将区域数据库文件复制来的过程,启动区域传输的机制我也总结了下,有以下三种情况:
①辅dns服务器刚启动;
②是soa记录中的刷新间隔到达;
③是master dns设置了主动通知辅dns数据有变化。

阅读(2478) | 评论(1) | 转发(1) |
0

上一篇:没有了

下一篇:linux下用crontab定时执行php程序

给主人留下些什么吧!~~

2011-12-15 23:13:42

原创帝!

|
")); function link(t){ var href= $(t).attr('href'); href ="?url=" encodeuricomponent(location.href); $(t).attr('href',href); //setcookie("returnouturl", location.href, 60, "/"); }
网站地图