Bind9 Falha na pesquisa inversa de DNS

2

Ok, então eu tenho um problema, que minha pesquisa inversa falha no meu bind9 dns

#nslookup 172.16.0.179
Server:     127.0.1.1
Address:    127.0.1.1#53

** server can't find 179.0.16.172.in-addr.arpa: NXDOMAIN

Aqui está minha zona reversa:

# nano /var/lib/bind/mosek.intranet.rev.zone

$ORIGIN .
$TTL 604800     ; 1 week
172.16.0.in-addr.arpa   IN SOA  braintree.mosek.intranet. admin.mosek.com. (
                            79         ; serial
                            604800     ; refresh (1 week)
                            86400      ; retry (1 day)
                            2419200    ; expire (4 weeks)
                            604800     ; minimum (1 week)
                            )
                    NS      braintree.mosek.intranet.
$ORIGIN 0.16.172.172.16.0.in-addr.arpa.
$TTL 3600       ; 1 hour
179                     PTR     harbinger.mosek.intranet.

A entrada PTR é algo que é bind9 autogerado

e aqui está meu /etc/bind/named.conf.local

//
// Do any local configuration here
//
include "/etc/bind/rndc.key";

zone "mosek.intranet" {
        type master;
        file "/var/lib/bind/mosek.intranet.zone";
        allow-update {key rndc-key; };
};

zone "172.16.0.in-addr.arpa"{
        type master;
        file "/var/lib/bind/mosek.intranet.rev.zone";
        allow-update {key rndc-key; };
};


// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

como eu vejo, tudo parece bem. o que poderia causar o problema?

EDITAR

Eu consegui trabalhar, então aqui está a configuração de trabalho:

# cat /etc/bind/named.conf.local
//
// Do any local configuration here
//
include "/etc/bind/rndc.key";

zone "mosek.intranet" {
        type master;
        file "/var/lib/bind/mosek.intranet.zone";
        allow-update {key rndc-key; };
};

zone "0.16.172.in-addr.arpa"{
        type master;
        file "/var/lib/bind/mosek.intranet.rev.zone";
        allow-update {key rndc-key; };
};


// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

.

# cat /var/lib/bind/mosek.intranet.rev.zone
$ORIGIN .
$TTL 604800     ; 1 week
0.16.172.in-addr.arpa   IN SOA  braintree.mosek.intranet. admin.mosek.com. (
                                79         ; serial
                                604800     ; refresh (1 week)
                                86400      ; retry (1 day)
                                2419200    ; expire (4 weeks)
                                604800     ; minimum (1 week)
                                )
                                NS      braintree.mosek.intranet.              $
$ORIGIN 0.16.172.in-addr.arpa.
$TTL 604800     ; 1 week
179                     PTR     harbinger.mosek.intranet.
    
por Tomas 08.04.2015 / 11:02

1 resposta

7

Ao especificar registros PTR usando o domínio in-addr.arpa , a parte menos significativa do endereço IP da rede deve vir antes das partes restantes, ou seja, o contrário da maneira usual de especificar endereços IP em notação ponto-decimal.

De artigo da Wikipedia sobre pesquisas de DNS reverso

Reverse DNS lookups for IPv4 addresses use a reverse IN-ADDR entry in the special domain in-addr.arpa. In this domain, an IPv4 address is represented as a concatenated sequence of four decimal numbers, separated by dots, to which is appended the second level domain suffix .in-addr.arpa. The four decimal numbers are obtained by splitting the 32-bit IPv4 address into four 8-bit portions and converting each 8-bit portion into a decimal number. These decimal numbers are then concatenated in the order: least significant 8-bit portion first (leftmost), most significant 8-bit portion last (rightmost). It is important to note that this is the reverse order to the usual dotted-decimal convention for writing IPv4 addresses in textual form.

No seu caso, 172.16.0.in-addr.arpa deve ser reescrito em todos seus arquivos de configuração do BIND como 0.16.172.in-addr.arpa . Por exemplo, veja como o arquivo de zona deve estar:

$ORIGIN .
$TTL 604800     ; 1 week
0.16.172.in-addr.arpa IN SOA  braintree.mosek.intranet. admin.mosek.com. (
                            79         ; serial
                            604800     ; refresh (1 week)
                            86400      ; retry (1 day)
                            2419200    ; expire (4 weeks)
                            604800     ; minimum (1 week)
                            )
                    NS      braintree.mosek.intranet.
$ORIGIN 0.16.172.in-addr.arpa
$TTL 3600       ; 1 hour
179                     PTR     harbinger.mosek.intranet
    
por 08.04.2015 / 11:37