Friday, 8 April 2011

Reverse DNS lookup using nslookup

It's easy to get the IP address from a domain name, just ping it.

C:\Users\Administrator>ping s15243155.onlinehome-server.info

Pinging s15243155.onlinehome-server.info [212.227.102.68] with 32 bytes of data

Or use nsLookup to get the A record, which does the same

C:\Users\Administrator>nslookup -q=a s15243155.onlinehome-server.info
Server: my.router
Address: 192.168.1.1

Non-authoritative answer:
Name: s15243155.onlinehome-server.info
Address: 212.227.102.68

To reverse the lookup, then you use the special "in-arpa.arpa" domain with the IP address backwards... like this

C:\Users\Administrator>nslookup -q=ptr 68.102.227.212.in-addr.arpa
Server: my.router
Address: 192.168.1.1

Non-authoritative answer:
68.102.227.212.in-addr.arpa name = s15243155.onlinehome-server.info

102.227.212.in-addr.arpa nameserver = nsa2.schlund.de
102.227.212.in-addr.arpa nameserver = nsa.schlund.de
nsa.schlund.de internet address = 195.20.224.98
nsa2.schlund.de internet address = 195.20.244.5

This really comes into play when fixing this error in ZoneCheck:

w: Reverse for the nameserver IP address doesn't match
  • ns1.xyz.net/86.xx.xx.194
To Fix this, click Start>Run>dnsmgmt.msc

Select Reverse Lookup zones, select the .in-addr.arpa.

Right Click, Select "New Pointer (PTR)", enter the first 3 digits of the IP into the "Host IP Address" and enter the nameserver domain into "Host name", then press OK




No comments: