无法使反向 DNS 正常工作

无法使反向 DNS 正常工作

我之前设置过 bind9,但现在我似乎在某个地方配置错误了,但我没发现。DNS 工作正常,反向 DNS 不行。我知道我必须反转 IP 范围才能使其正常工作。在我的配置下面。有没有人能告诉我我哪里搞砸了?

/etc/bind/named.conf.默认区域

// prime the server with knowledge of the root servers
zone "." {
    type hint;
    file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
    type master;
    file "/etc/bind/db.local";
};

    zone "127.in-addr.arpa" {
    type master;
    file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
    type master;
    file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
    type master;
    file "/etc/bind/db.255";
};

zone "10.168.192.in-addr.arpa" in {
    file "/etc/bind/db.10.168.192.in-addr.arpa";
    type master;
    check-names ignore;
};

zone "XXX.local" in {
    file "/etc/bind/db.XXX.local";
    type master;
    check-names ignore;
};

/etc/bind/db.XXX.local

$TTL 2D
@               IN SOA          fw.XXX.be.  root.fw.XXX.be. (
                                2011071000      ; serial
                                3H              ; refresh
                                1H              ; retry
                                1W              ; expiry
                                1D )            ; minimum

XXX.local.              IN NS           fw.XXX.be.

XXXApp01                A               192.168.10.6
XXXApp02                A               192.168.10.7
XXXHistorian            A               192.168.10.8
XXXShared               A               192.168.10.9
XXXFujitsuLaptop        A               192.168.10.3
fw                      A               192.168.10.254

/etc/bind/db.10.168.192.in-addr.arpa

$ORIGIN .
$TTL 604800     ; 1 week
10.168.192.in-addr.arpa  IN SOA  fw.XXX.be root.XXX.be. (
                                3          ; serial
                                604800     ; refresh (1 week)
                                86400      ; retry (1 day)
                                2419200    ; expire (4 weeks)
                                604800     ; minimum (1 week)
                                )
                        NS      fw.
$ORIGIN 10.168.192.in-addr.arpa.
$TTL 1200       ; 20 minutes
254             PTR     fw.XXX.be.
$TTL 604800     ; 1 week
006             PTR     XXXApp01.XXX.local.
007             PTR     XXXApp02.XXX.local.
008             PTR     XXXHistorian.XXX.local.
009             PTR     XXXShared.XXX.local.
003             PTR     XXXFujitsuLaptop.XXX.local.

/etc/bind/named.conf.options

options {
    directory "/var/cache/bind";
    dnssec-validation auto;

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
    allow-query { localhost; 192.168.10.0/24; 192.168.160.0/24; 10.0.0.0/16; 10.0.50.0/24; 10.0.51.0/24; };
};

在此先致以万分谢意,

干杯,

乔德

答案1

我认为反向区域文件中可能缺少 NS 记录(我看不到“IN”位)。另外,您可能不需要用零填充最后一个八位字节。

相关内容