1

I have set up my bind server but am unable to perform reverse look up the nslookup.

The config file looks like this.

acl "internal" {192.168.5.0/24;};

view "internal" {

    match-clients   {"internal";};
    recursion       yes;

    zone "home" {
            type    master;
            file    "master/home.db";
    };

    zone "sludge.home" {
            type    master;
            file    "master/sludge.home.db";
    };

    zone "192.168.5.in-addr.arpa" {
            type    master;
            file    "master/192.168.5.db";
    };

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

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

    zone "." {
            type    hint;
            file    "master/root.hint";
    };

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

    zone "0.0.127.in-addr.arpa" {
            type master;
            file "master/127.0.0.db";
    };
};

The 192.168.5.db looks like this.

$TTL    4w

@ IN SOA dns.home. home. (
        2011030403 ; serial
        3h         ; refresh after 1 week
        1h         ; retry after 1 week
        1w         ; expire after 1 week
        1h )       ; negative caching TTL of 1 hour

                        IN NS   dns.home.

12                      IN PTR  dns.home.
13                      IN PTR  firewall.home.
15                      IN PTR  sludge.home.

Thanks for the help.

Thomas
  • 133
  • 2
  • 5

1 Answers1

5

in-addr.arpa addresses have the octets in reverse order, so the zone should be

zone "5.168.192.in-addr.arpa" {
        type    master;
        file    "master/192.168.5.db";
};

(the filename doesn't matter, but you might want to switch it around there too to match)

Requests should be of the form 12.5.168.192.in-addr.arpa. dig -x 192.168.5.12 will automatically perform this transformation.

DerfK
  • 19,493
  • 2
  • 38
  • 54