我有一个安装了 Bind9 的 DNS 服务器,它有 IP 192.168.145.119
。这可以作为 IP 上的 DNS 服务器的解析器192.168.145.1
。
ping
我已经设置,所以它在使用、使用等时作为转发器工作dig
。我还设置了一个带有 CNAME 的区域。正如预期的那样,这很好用。但是,反向查找不起作用。如果我跑步,nslookup 192.168.145.96
我会得到:
** server can't find 96.145.168.192.in-addr.arpa: NXDOMAIN
我该如何解决这个问题?
这是我的named.conf
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
options {
directory "/var/cache/bind";
recursion yes;
allow-query { any; };
allow-transfer {
localhost;
# Bind9 slave
192.168.145.218;
};
forwarders {
192.168.145.1;
};
dnssec-enable no;
dnssec-validation false;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
include "/etc/bind/domain.conf";
域.conf
zone "domain" {
type master;
file "/etc/bind/zones/db.domain";
allow-transfer {
192.168.145.218;
};
notify yes;
};
db.domain
;
; BIND reverse data file for broadcast zone
;
$TTL 604800
@ IN SOA ns1.domain admin.domain. (
202001161 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS ns1.domain.
IN NS ns2.domain.
ns1.domain. IN A 192.168.145.119
ns2.domain. IN A 192.168.145.218
docker-registry-vm1.domain IN CNAME docker-registry-vm1.internal.
dns-master-vm1.domain. IN CNAME dns-master-vm1.internal.
dns-slave-vm1.domain. IN CNAME dns-slave-vm1.internal.