背景:
阅读新闻
精解Linux RHEL 6.x DNS 服务器
[日期:2013-08-17] 来源:Linux社区 作者:litaotao [字体:]
六、DNS的子域授权
#######父域的主配置文件和区域配置文件还是之前的不需要改动######
#########修改区域解析库文件vim /var/named/jie.com.zone#########
$TTL 6400
@ IN SOA dns.jie.com. admin.jie.com. (
2013081401 ;serial numbel
2h ;refresh time
5m ;retry time
7d ;expire time
1d ;minimum
)
IN NS dns.jie.com.
dns.jie.com. IN A 172.16.22.2
www IN A 172.16.22.2
www IN A 172.16.22.20
www IN A 172.16.22.200
ftp IN A 172.16.22.220
son IN A 172.16.122.4 #添加子域的A记录
IN NS son.jie.com. #添加子域的NS记录
dns IN A 172.16.122.4
###子域的主配置文件/etc/named.conf#########
options {
// listen-on port 53 { 127.0.0.1; };
// 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";
// allow-query { localhost; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
#####子域的区域配置文件/etc/named.rfc1912.com添加一点内容########
zone "son.jie.com" IN {
type master;
file "son.jie.com.zone";
};
########子域的区域解析库文件/var/named/son.jie.com.zone添加一点内容####
$TTL 1D
@ IN SOA dns.son.jie.com. admin.son.jie.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS dns.son.jie.com.
dns IN A 172.16.122.4
www IN A 172.16.122.40
www IN A 172.16.122.140
www IN A 172.16.122.240
ftp IN A 172.16.122.200
mail IN A 172.16.122.250
父域的测试:父域是直接可以解析子域的,子域默认是不能解析父域
[root@jie2 named]# host -t A
has address 172.16.122.240
has address 172.16.122.40
has address 172.16.122.140
子域也能解析父域,①可以把子域的DNS指向父域,②在子域上面做转发,父域接收子域的转发请求
CentOS 6.4安装配置Nginx+Pcre+php-fpm
Ubuntu下用libvirt安装KVM虚拟机时找不到/bin/qemu-kvm问题解决
相关资讯 DNS服务器 RHEL6 DNS服务器
本文评论 查看全部评论 (0)
尊重网上道德,遵守中华人民共和国的各项有关法律法规 承担一切因您的行为而直接或间接导致的民事或刑事法律责任 本站管理人员有权保留或删除其管辖留言中的任意内容 本站有权在网站内转载或引用您的评论 参与本评论即表明您已经阅读并接受上述条款
评论声明
最新资讯