A little while ago i set up reverse lookup for our DNS server.
The DNS server is very simple. I'm using BIND9 running on Debian jessie. The IP addresses are all static. The zone file looks like this (I replaced some stuff from the original file with example
to disguise some information):
$TTL 604800
@ IN SOA ns.example. someone.example.de. (
4358998787 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.example.
ns IN A 192.168.2.2
someone IN A 192.168.2.3
; And some more records...
The reverse lookup file looks like this (again some diguised informations...):
$TTL 604800
@ IN SOA ns.example. someone.example.de (
4561621654 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS ns.example.
1 IN PTR someting
2 IN PTR ns
; More records here
My named.conf.local looks like this:
zone "example" {
type master;
file "db.bartscher";
notify no;
};
zone "2.168.192.in-addr.arpa" IN {
type master;
file "2.168.192.in-addr.arpa";
allow-update { none; };
};
If i now lookup some name like this:
$ host someone
someone.example has address 192.168.2.3
And then reverse lookup that address like this:
$ host 192.168.2.3
3.2.168.192.in-addr.arpa domain name pointer someone.example.2.168.192.in-addr.arpa.
The domain name has a lot of stuff appended
Is this supposed to be like that? When i lookup some other domain name (which isn't in our domain) i get an ip address which can be looked up to another name which maps back to the same ip address, which doesn't hold for our reverse lookup. How can i configure BIND so looking up someone.example returns 192.168.2.3 and looking up 192.168.2.3 returns just someone.example? Is this even desired or is it "right" that the reverse lookup returns another domain?
To set up the reverse lookup i followed this guide