标签:type 版本 serial debian 9 地址 view nts ati 网络设置
目的配置内部DNS
Debian 9
bind 9
named.conf.default-zones文件无效化
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
// include "/etc/bind/named.conf.default-zones";
view "internal"{
match-clients {
localhost;
192.168.0.0/16;
};
zone "fugafuga.info" {
type master;
file "/etc/bind/fugafuga.info.internal-zone";
};
zone "hogehoge.com" {
type master;
file "/etc/bind/hogehoge.com.internal-zone";
};
zone "168.192.in-addr.arpa" {
type master;
file "/etc/bind/168.192.in-addr.arpa.zone";
};
};
使用view,一部分客户被提供DNS。"matchclients"设置那个客户。
$TTL 3600
@ IN SOA hogehoge.com. hogehogemail.com.(
20180723 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
@ IN NS fugafuga.info.
hogehoge.com. IN A 192.168.11.200
Time To Live - 生存时间
在SOA的后面写域名和电子邮件地址。
设置DNS服务器。
设置域名和IP地址。
$TTL 3600
@ IN SOA fugafuga.info. hogehogemail.com.(
20180723 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
@ IN NS fugafuga.info.
fugafuga.info. IN A 192.168.11.205
$TTL 3600
@ IN SOA fugafuga.info. hogehogemail.com.(
20180723 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
@ IN NS fugafuga.info.
11.200 IN PTR hogehoge.com.
11.205 IN PTR fugafuga.info.
设置IP地址和域名。
用named-checkconf命令检查configuration file和zone file。
$ /usr/sbin/named-checkconf
$ /usr/sbin/named-checkconf -z
zone fugafuga.info/IN: loaded serial 20180723
zone hogehoge.com/IN: loaded serial 20180723
zone 168.192.in-addr.arpa/IN: loaded serial 20180723
$ sudo service bind9 restart
$ sudo vim /etc/network/interfaces
(中略)
dns-nameservers 192.168.11.205 8.8.8.8
(中略)
sudo ifdown enp3s0
sudo ifup enp3s0
标签:type 版本 serial debian 9 地址 view nts ati 网络设置
原文地址:http://blog.51cto.com/13853768/2149005