主DNS服务器使用Redhat7.5,域名为juzldream.fun,且搭配的IP网段为192.168.5.0/24这一段,因此主要的正解网域为juzldream.fun,而反解的网域则为192.168.5.0/24。
-
配置/etc/named/named.conf options选项配置
options { directory "/var/named"; allow-recursion {192.168.5.136;}; notify yes; #启动通知功能 }; zone "." IN { type hint; file "named.ca"; }; zone "localhost" IN { type master; file "named.localhost"; allow-transfer {none;}; #不允许增量传送 }; zone "0.0.127.in-addr.arpa" IN { type master; file "named.loopback"; allow-transfer {none;}; }; zone "juzldream.fun" IN { type master; file "juzldream.fun"; allow-transfer {192.168.5.128;}; #允许192.168.5.128从服务器传送 }; zone "5.168.192.in-addr.arpa" IN { type master; file "juzldream.back"; allow-transfer {192.168.5.128;}; };
-
juzldream.fun 正向区域数据文件配置
$TTL 600 @ IN SOA ns1.juzldream.fun. admin.juzldream.fun. ( 2019021805 1H 5M 2D 6H ) IN NS ns1 IN NS ns2 IN MX 10 mail ns1 IN A 192.168.5.130 ns2 IN A 192.168.5.128 ;从DNS服务地址,tips 从服务器需要配置ns2地址。 mail IN A 192.168.5.140 www IN A 192.168.5.150 www IN A 192.168.5.151 ftp IN A 192.168.5.160 pop IN CNAME mail web IN CNAME www test IN A 192.168.5.170 *.juzldream.fun. IN A 192.168.5.88 ;DNS泛域名解析
-
juzldream.jun 反向区域数据文件配置
$TTL 600 @ IN SOA ns1.juzldream.fun. admin.juzldream.fun. ( 2019021803 1H 5M 2D 6H ) IN NS ns1.juzldream.fun. IN NS ns2.juzldream.fun. 130 IN PTR ns1.juzldream.fun. 128 IN PTR ns2.juzldream.fun. 140 IN PTR mail.juzldream.fun. 150 IN PTR www.juzldream.fun. 151 IN PTR www.juzldream.fun. 160 IN PTR ftp.juzldream.fun. 170 IN PTR test.juzldream.fun.
-
检查配置文件设置是否正确
[root@testdns ~]# named-checkconf
-
检查zone文件配置是否正确
[root@testdns ~]# named-checkzone "5.168.192.in-addr.arpa" /var/named/juzldream.back zone 5.168.192.in-addr.arpa/IN: loaded serial 2019021804 OK [root@testdns ~]# named-checkzone "juzldream.fun" /var/named/juzldream.fun zone juzldream.fun/IN: loaded serial 2019021806 OK
-
启动DNS服务器
named -f -g -d 3 -u named
域名正反向测试
主DNS服务器配置
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...