CentOS-5.6-x86_64 下搭建DNS服务器[服务器安全]
本文“CentOS-5.6-x86_64 下搭建DNS服务器[服务器安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
1、安装
# yum install -y bind bind-chroot ypbind bind-utils
# rpm -qa |grep bind
bind-libs-9.3.6-16.P1.el5
bind-utils-9.3.6-16.P1.el5
ypbind-1.19-12.el5_6.1
bind-9.3.6-16.P1.el5
bind-chroot-9.3.6-16.P1.el5
# yum install -y caching-nameserver-9.3.* //安装后可启动named
# service named start
# netstat -antup //TCP 53\953端口开放,953供应应rndc工具用来管理DNS服务器
2、
1.主区域配置
# cd /var/named/chroot/etc //以下操作均在此途径下
# cp -p named.caching-nameserver.conf named.conf //注意加 -p 所属组不变
# cp -p named.rfc1912.zones named.rfc1912.zones_back
# vim named.conf
### 配置内容以下:
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { any; };
allow-query-cache { any; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
### 完毕 ###
# vim named.rfc1912.zones
### 配置内容以下:
zone "." IN {
type hint;
file "named.ca";
};
zone "laowafang.com" IN {
type master;
file "test.com.zone";
allow-update { none; };
};
zone "146.147.119.in-addr.arpa" IN {
type master;
file "test.com.local";
allow-update { none; };
};
### 完毕 ###
2.区域文件配置
# cd /var/named/chroot/var/named //以下操作均在此途径下
# cp -p localhost.zone test.com.zone //拷贝正向文件
# cp -p named.local test.com.local //拷贝反向文件
# vim test.com.zone
### 配置内容以下:
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS dns.test.com.
IN MX 10 mail.test.com.
以上是“CentOS-5.6-x86_64 下搭建DNS服务器[服务器安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |