0

I have bind9 installed on a PI. And tried to setup a simple ipv4 and ipv6 config.

For ipv4 forward and reverse lookups are working fine. Also the forward lookups for ipv6 are looking good. But i cannot get the reverse lookup's working for ipV6.

When doing a zone check i got the message:

named-checkzone vl2.home.arpa db.rvlan2v6.in-addr.arpa db.rvlan2v6.in-addr.arpa:4: SOA record not at top of zone (0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa.vl2.home.arpa) zone vl2.home.arpa/IN: loading from master file db.rvlan2v6.in-addr.arpa failed: not at top of zone zone vl2.home.arpa/IN: not loaded due to errors.

Can someone explain what I am doing wrong here?

My bind.conf.local looks like:

zone "vl2.home.arpa" IN {
             type master;
             file "/etc/bind/vl2.home.arpa";
       };


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

zone "2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa" {
             type master;
             file "/etc/bind/db.rvlan2v6.in-addr.arpa";
       };

the zone file that contains the IPV4 and IPV6 forward lookups does contain the following:

;------------------------------------------------------------------------------
; include default db.soa for mappings below
;------------------------------------------------------------------------------
$include        /etc/bind/db.soa
;
;
;------------------------------------------------------------------------------
; Adresses for canonical names
;------------------------------------------------------------------------------
;
; Local loopback address
;------------------------------------------------------------------------------
;
localhost       IN A    127.0.0.1
localhost       IN AAAA         ::1
; local host aliases
loopback        IN CNAME localhost
;------------------------------------------------------------------------------
;
;------------------------------------------------------------------------------
; Namesevers voor 192.168.200 prod-lan
;------------------------------------------------------------------------------
;
;@       IN NS cspi.vlan2.lan.
@       IN NS cspi.home.arpa.
@       IN NS cspiv6.home.arpa.
;
;------------------------------------------------------------------------------
; Hosts in 192.168.200 prod-lan
;------------------------------------------------------------------------------
;
cspi    IN A    192.168.200.30
cspiv6  IN AAAA 2a02:a459:1dbb:2::1e

and reverse ipv4 zone looks like:

$TTL 2d    ; default TTL for zone

@ IN SOA vl2.home.arpa. cs.vl2.home.arpa. (
        2022090201 ; serial
        8H ; refresh
        4H ; retry
        4W ; expire
        1H ; minimum
        )

        IN NS localhost.

30      IN PTR cspi.vl2.home.arpa.

The zone that gives the error and thus not loades looks like:

$ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa
$TTL 2d    ; default TTL for zone

@ IN SOA vl2.home.arpa. cs.vl2.home.arpa. (
        2022090201 ; serial
        8H ; refresh
        4H ; retry
        4W ; expire
        1H ; minimum
        )

        IN NS localhost.

e.1     IN PTR  cspiv6.vl2.home.arpa.

Any help is appreciated!

2 Answers 2

0

Your origins are relative rather than absolute, they need a dot at the end...

$ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa.

and

zone "2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa." {

0

Thanks for you quick answer. Got it now working but still struggle with some questions.

the named.conf.local I changed now into:

"0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa" {
             type master;
             file "/etc/bind/db.rvlan2v6.in-addr.arpa";
       };

and the reverse zone lookup file I changend into:

; line below does not work ??
;$ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa.
;
$TTL 2d    ; default TTL for zone

@ IN SOA vl2.home.arpa. cs.vl2.home.arpa. (
    2022090201 ; serial
    8H ; refresh
    4H ; retry
    4W ; expire
    1H ; minimum
    )

    IN NS localhost.

e.1 IN PTR  cspiv6.vl2.home.arpa.

```
This configuration works, however I tried to understand why it already works without using the $OPTION statement?

Second question i liked to shorten the zone definition in the named.config.local
but it seems that is not allowed. 

I will test tomorrow again with using the $OPTION statement this time with a . at the end.

Thanks so much for sharing this with me. I appreciate this!

3
  • Please add info into original question rather than post another question as an answer, then update my answer with a comment. Either way, in named.conf.local, you are missing the trailing dot in "0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa", it should be "0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa."
    – Bib
    Commented Oct 3, 2022 at 16:11
  • If you reduce the size of ORIGIN, then you must extend with corresponding size of the PTR. ORIGIN will take its setting from named.conf.local, specifically zone "2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa" {
    – Bib
    Commented Oct 3, 2022 at 16:15
  • tested again and again with trailing "." but does not work either. Commented Oct 6, 2022 at 9:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .