-
建立一个名为telecom的名字,这个名字代表客户端为 192.168.100.0/24 的来源即电信运营商用户;
acl telecom { 172.16.0.0/16; 127.0.0.0/6; };
-
建立一个名为unicom的名字,这个名字代表客户端为 192.168.100.0/24 的来源即联通运营商用户;
acl unicom { 192.168.0.0/24; };
-
视图定义
view telecom { match-clients {telecom;}; zone "juzldream.fun" IN { type master; file "telecom.juzldream.fun" }; zone "a.net" IN { type master; file "z.net.zone"; }; }; view unicom { match-clients {unicom;}; # 使用match-clients指令,指定匹配来自这些用户的ip zone "juzldream.fun" IN { type master; file "unicom.juzldream.fun" #不同的匹配规则我这里写的是用不同的域名文件,方便管理 }; zone "a.net" IN { type master; file "z.net.zone"; }; }; view other {} match-clients {any;}; zone "juzldream.fun" IN { type master; file "unicom.juzldream.fun" }; };
-
区域数据文件定义
[root@testdns named]# cat unicom.juzldream.fun $TTL 600 ;生存周期为600s @ IN SOA master.juzldream.fun. admin.juzldream.fun. ( ;授权信息开始 DNS区域的地址 域名管理员的邮箱(不能用@符合) 2019021808;serial #更新序列号 1H;refresh #更新时间 5M;retry #重试延时 2D;expire #失效时间 6H;nagative answer TTL #否定答案的缓存时长 ) IN NS master;域名服务器记录 IN MX 10 mail;邮箱交换地址 master IN A 192.168.5.130;地址记录(master.juzldream.fun.) mail IN A 192.168.5.140;地址记录(mail.juzldream.fun.) test IN A 192.168.5.119 [root@testdns named]# cat telecom.juzldream.fun $TTL 600 ;生存周期为600s @ IN SOA master.juzldream.fun. admin.juzldream.fun. ( ;授权信息开始 DNS区域的地址 域名管理员的邮箱(不能用@符合) 2019021808;serial #更新序列号 1H;refresh #更新时间 5M;retry #重试延时 2D;expire #失效时间 6H;nagative answer TTL #否定答案的缓存时长 ) IN NS master;域名服务器记录 IN MX 10 mail;邮箱交换地址 master IN A 192.168.5.130;地址记录(master.juzldream.fun.) mail IN A 192.168.5.145;地址记录(mail.juzldream.fun.) test IN A 192.168.5.110 [root@testdns named]# cat other.juzldream.fun $TTL 600 ;生存周期为600s @ IN SOA master.juzldream.fun. admin.juzldream.fun. ( ;授权信息开始 DNS区域的地址 域名管理员的邮箱(不能用@符合) 2019021808;serial #更新序列号 1H;refresh #更新时间 5M;retry #重试延时 2D;expire #失效时间 6H;nagative answer TTL #否定答案的缓存时长 ) IN NS master;域名服务器记录 IN MX 10 mail;邮箱交换地址 master IN A 192.168.5.130;地址记录(master.juzldream.fun.) mail IN A 192.168.5.140;地址记录(mail.juzldream.fun.) test IN A 192.168.5.111
网友评论