4

I am trying to set up a custom virtual DNS server in Ubuntu. When I try to nslookup with a windows 7 pc within the same virtual environment the reverse DNS seems te fail.

My named.conf.local file:

zone "linuxserver"{
    type master;
    file "/etc/bind/zones/master/db.linuxserver.nl"
}

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

My db.linuxserver.nl file:

TTL 604800

@    IN    SOA    ns1.linuxserver.nl. root.linuxserver.nl. (
     1     ; Serial
     3H    ; Refresh
     1h    ; Retry
     1w    ; Expire
     1h)   ; Negative cache TTL    

;
@                IN        NS        ns1.linuxserver.nl

linuxserver.nl   IN        A         10.0.0.2
ns1              IN        A         10.0.0.2
www              IN        CNAME     linuxserver.nl. 

My db.10.0.0 file:

TTL 604800

10.0.0.in-addr.arpa.    IN    SOA    ns1.linuxserver.nl. root.linuxserver.nl. (
     1     ; Serial
     3H    ; Refresh
     1h    ; Retry
     1w    ; Expire
     1h)   ; Negative cache TTL    

;
10.0.0.in-addr.arpa.   IN        NS        ns1.linuxserver.nl.
10.0.0.2.in-addr.arpa. IN        A         linuxserver.nl.

I removed all the trailing white spaces and entering the following command

named-checkzone 10.0.0.in-addr.arpa /etc/bind/zones/master/db.10.0.0

gives me:

: ignoring out-of-zone data (10.0.0.2.in-addr.arpa)

What am i doing wrong?

Kipt Scriddy
  • 143
  • 1
  • 3

1 Answers1

3

When you create a reverse zone you need to reverse the IP range.
If you want to create the zone for 10.1.2.0/24 you need to name it 2.1.10.in-addr.arpa or in your case 0.0.10.in-addr.arpa.

Yours is the other way around.

faker
  • 17,496
  • 2
  • 60
  • 70
  • Thx! Just changed everything. The reason why I was keeping the same error with named-checkzone is because I still typed `named-checkzone 10.0.0.in-addr.arpa /etc/bind/zones/master/db.10.0.0` instead of `named-checkzone 0.0.10.in-addr.arpa /etc/bind/zones/master/db.10.0.0` – Kipt Scriddy Mar 09 '14 at 18:25