我最近尝试设置 DNS。检查工具告诉我缺少一些 A 记录。但我想我做到了。
区域文件:
$ORIGIN .
$TTL 2D
. IN SOA ns1. root.ns1. (
2016052404 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
3H ; NX (TTL Negativ Cache)
)
. IN NS ns1.
ns1. IN A 192.168.107.2
at. IN NS ns1.at.
ns1.at. IN A 192.168.107.3
jp. IN NS ns1.jp.
ns1.jp. IN A 192.168.107.5
user@dns1:/etc/bind# sudo named-checkzone . db.zonefile
zone ./IN: at/NS 'ns1.at' (out of zone) has no addresses records (A or AAAA)
zone ./IN: jp/NS 'ns1.jp' (out of zone) has no addresses records (A or AAAA)
zone ./IN: loaded serial 2016052404
OK
/etc/bind/named-conf.local
zone "." {
type master;
file "/etc/bind/db.zonefile";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.0.168.192";
};
/etc/resolv.conf:
search .
nameserver 127.0.0.1