我的测试环境中有 2 个 DNS 服务器:
- Centos 7 x64 VM - 运行 BIND 9.9.4-RedHat-9.9.4-50.el7_3.1 主 DNS
- Raspbian GNU/Linux 8 Jessie-运行 BIND 9.9.5-9+deb8u12-Raspbian - 辅助 DNS
我的配置对于区域文件正常工作,但它不适用于反向区域文件。辅助节点的 DNS 日志报告以下内容:
Jul 11 09:04:44 dns2-ph-village-rc1 named[3831]: zone 0.244.224.10/IN: refresh: non-authoritative answer from master 10.224.244.129#53 (source 0.0.0.0#0)
反向区域文件的配置为:
$ORIGIN 224.10.in-addr.arpa.
$TTL 86400
@ IN SOA dns1-vr1.network.ddns.net. root.network.ddns.net. (
2017071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL for NX Domain (non existent)
)
@ IN NS dns1-vr.network.ddns.net.
@ IN NS dns2-ph-village-rc1.network.ddns.net.
129.244 IN PTR dns1-vr.network.ddns.net.
4.246 IN PTR dns2-ph-village-rc1.network.ddns.net.
3.246 IN PTR gateway2-ph-village-rc1.network.ddns.net.
PRIMARY 上的named.conf 配置为:
; omitting acl declarations
options {
listen-on-v6 { none; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { mynet; };
allow-transfer { inner; };
recursion yes;
notify yes;
dnssec-enable no;
dnssec-validation no;
dnssec-lookaside auto;
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
; omitting log declarations
view "inside" {
match-clients {
mynet;
};
zone "." IN {
type hint;
file "named.ca";
};
zone "network.ddns.net" IN {
type master;
file "network.ddns.net.lan";
allow-update { none; };
};
zone "224.10.in-addr.arpa" IN {
type master;
file "0.244.224.10.db";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
};
次要 DNS 上的 name.conf 是:
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
include "/etc/bind/named.conf.external-zones";
SECONDARY 上的named.conf.external-zones 是:
zone "network.ddns.net" IN {
type slave;
masters { 10.224.244.129; };
file "/etc/bind/slaves/network.ddns.net.lan";
notify no;
};
zone "0.244.224.10" IN {
type slave;
masters { 10.224.244.129; };
file "/etc/bind/slaves/0.244.224.10.db";
notify no;
};
network.ddns.net.lan 在 /etc/bind/slaves/ 中创建
0.224.244.10 是不是在/etc/bind/slaves/中创建
答案1
您在从站上的反向区域声明配置中有错误。
zone "0.244.224.10" IN { ... }
应该
zone "224.10.in-addr.arpa" IN { ... }
我很惊讶这没有被拾取并在从属日志文件中报告为配置错误。 (你确定它没有告诉你这件事吗?)