标签:网址 写入 情况 beijing 注释 过程 允许 mamicode 关闭
改配置/etc/named.conf
listen-on port 53 { localhost; }; #代表监听本机的所有ip
allow-query { any; }; #代表允许所有ip查询
dnssec-enable no; #关闭dnssec
加入/etc/named.rfc1912.zones
zone "chaoyi.com" {
type master;
file "chaoyi.com.zone";
};
在/var/named 下建立文件 chaoyi.com.zone
$TTL 86400
$ORIGIN chaoyi.com.
@ IN SOA ns1.chaoyi.com. admin.chaoyi.com (
2015042201
1H
5M
7D
1D )
IN NS ns1
IN NS ns2
IN MX 10 mx
ns1 IN A 172.16.100.11
ns2 IN A 172.16.100.12
mx IN A 172.16.100.13
websrv IN A 172.16.100.11
websrv IN A 172.16.100.12
www IN CNAME websrv
改配置/etc/named.conf
listen-on port 53 { localhost; }; #代表监听本机的所有ip
allow-query { any; }; #代表允许所有ip查询
dnssec-enable no; #关闭dnssec
加入/etc/named.rfc1912.zones
zone "chaoyi.com" IN {
type slave;
masters { 172.16.10.11; };
file "slaves/chaoyi.com.zone";
};
设置 172.16.10.0/24 用 beijing 配置
172.16.11.0/24 用 guangzhow 配置
改配置/etc/named.conf
在 option 前
acl beijing { 172.16.10.0/24;};
acl guangzhow { 172.16.11.0/24;};
acl other { any;};
在 option 里
listen-on port 53 { localhost; }; #代表监听本机的所有ip
allow-query { any; }; #代表允许所有ip查询
dnssec-enable no; #关闭dnssec
最后写入
view beijingview {
match-clients {beijing;};
include "/etc/named.beijingview.zones";
};
view guangzhowview {
match-clients {guangzhow;};
include "/etc/named.guangzhowview.zones";
};
view otherview {
match-clients {other;};
include "/etc/named.rfc1912.zones";
};
把 include "/etc/named.rfc1912.zones"; 注释了增加文件
vim /etc/named.beijingview.zones
zone "chaoyi.com" {
type master;
file "chaoyi.com.zone.bj";
};
vim /etc/named.zhengzhouview.zones
zone "chaoyi.com" {
type master;
file "chaoyi.com.zone.zz";
};
增加 zone
vim /var/named/chaoyi.com.zone.bj
$TTL 86400 ; 1 day
@ IN SOA dns1 dnsadmin (
3 ; serial
86400 ; refresh (1 day)
3600 ; retry (1 hour)
604800 ; expire (1 week)
10800 ; minimum (3 hours)
)
NS dns1.chaoyi.com.
dns1 A 172.16.100.10
websrv A 1.1.1.1
www CNAME websrv
vim /var/named/chaoyi.com.zone.gz
$TTL 86400 ; 1 day
@ IN SOA dns1 dnsadmin (
3 ; serial
86400 ; refresh (1 day)
3600 ; retry (1 hour)
604800 ; expire (1 week)
10800 ; minimum (3 hours)
)
NS dns1.chaoyi.com.
dns1 A 172.16.100.10
websrv A 3.3.3.3
www CNAME websrv
标签:网址 写入 情况 beijing 注释 过程 允许 mamicode 关闭
原文地址:https://www.cnblogs.com/chaoyiyang/p/12111043.html