I had configured a DNS server.But when nslookup with the IP address of the DNS server. It shows something like that"x.x.x.x.in-addr.arpa name=dns.domain.com". But when i nslookup with the dns.domain.com output is ok.
The output of nslookup is to be expected.
When you look up an IP address for which a PTR record is set up, the result is that same IP address, with the octets printed in reverse order, ending with
Finally, you get the corresponding fully qualified domain name set in the PTR record.
If a PTR record is not set, you will get NXDOMAIN as a lookup result for that IP address.
Example of a result of a reverse lookup with a PTR record
I do a lookup of twitter.com
kenny@computer ~ $ nslookup twitter.com Server: 127.0.1.1 Address: 127.0.1.1#53 Non-authoritative answer: Name: twitter.com Address: 126.96.36.199 Name: twitter.com Address: 188.8.131.52 Name: twitter.com Address: 184.108.40.206
I now do a reverse lookup of the first result of my previous lookup.
kenny@computer ~ $ nslookup 220.127.116.11 Server: 127.0.1.1 Address: 127.0.1.1#53 Non-authoritative answer: 10.148.59.199.in-addr.arpa name = r-199-59-148-10.twttr.com. Authoritative answers can be found from:
Ok, so it turns out that the folks at twitter set up a PTR record for that IP address (note that the octets of the IP in the output are reversed, beginning with 10 and ending with 199) that points to r-199-59-148-10.twttr.com.
Example of a result of a reverse lookup without a PTR record
Let's do the same thing for this website, stackoverflow.com
kenny@computer ~ $ nslookup stackoverflow.com Server: 127.0.1.1 Address: 127.0.1.1#53 Non-authoritative answer: Name: stackoverflow.com Address: 18.104.22.168
The result is only one IP address, let's do a reverse lookup on that.
kenny@computer ~ $ nslookup 22.214.171.124 Server: 127.0.1.1 Address: 127.0.1.1#53 ** server can't find 126.96.36.199.in-addr.arpa.: NXDOMAIN
Again, the octets in the output have been reversed and appended with
.in-addr.arpa. The result this time is not a domain name, but NXDOMAIN. No PTR record is set.