Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Sun Dec 10, 2023 5:41 am


Internet Protocol, Transport Control Protocol, Network protocols, Routing, Routers, IP aliases, Routes, Ethernet

Author Message
mandrei99
Post  Post subject: DNS reverse lookup in Windows 7 and Linux using - nslookup  |  Posted: Tue Jan 13, 2015 8:31 pm

Joined: Tue Aug 04, 2009 9:16 am
Posts: 250

Offline
 

DNS reverse lookup in Windows 7 and Linux using - nslookup

In a previous article "Unix reverse dns lookup - using dig command" http://forum.ivorde.com/unix-reverse-dns-lookup-using-dig-command-ptr-dns-record-type-t19521.html - some of the most used dns record types and it focused on dns reverse lookups - PTR records - that return a human readable fqdn for an ip address.

Below are few examples of dns reverse lookups using "nslookup" tool available in both Linux and Windows.

First using oneline nslookup command:
Code:
C:\Users\Andrei>nslookup -querytype=ptr 8.8.8.8
Server:  UnKnown
Address:  172.16.20.2

Non-authoritative answer:
8.8.8.8.in-addr.arpa    name = google-public-dns-a.google.com

8.8.8.in-addr.arpa      nameserver = ns3.google.com
8.8.8.in-addr.arpa      nameserver = ns1.google.com
8.8.8.in-addr.arpa      nameserver = ns2.google.com
8.8.8.in-addr.arpa      nameserver = ns4.google.com
ns1.google.com  internet address = 216.239.32.10
ns2.google.com  internet address = 216.239.34.10
ns3.google.com  internet address = 216.239.36.10
ns4.google.com  internet address = 216.239.38.10


Using interactive nslookup mode:
Code:
C:\Users\Andrei>nslookup -querytype=ptr 8.8.8.8
Server:  UnKnown
Address:  172.16.20.2

Non-authoritative answer:
8.8.8.8.in-addr.arpa    name = google-public-dns-a.google.com

8.8.8.in-addr.arpa      nameserver = ns3.google.com
8.8.8.in-addr.arpa      nameserver = ns1.google.com
8.8.8.in-addr.arpa      nameserver = ns2.google.com
8.8.8.in-addr.arpa      nameserver = ns4.google.com
ns1.google.com  internet address = 216.239.32.10
ns2.google.com  internet address = 216.239.34.10
ns3.google.com  internet address = 216.239.36.10
ns4.google.com  internet address = 216.239.38.10

Both of the above examples perform reverse lookup for IP 8.8.8.8 - they return the PTR dns record.

How to perform DNS reverse lookup using nslookup to a specific server:
The basic nslookup syntax, as per manual is, quote:
Quote:
nslookup [-option] [name | -] [server]

To query a specific server for PTR record for an Ip address / do reverse lookup:
Code:
C:\Users\Andrei>nslookup -querytype=ptr 82.76.71.249 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
249.71.76.82.in-addr.arpa       name = mail.ivorde.ro


The last argument is the target server to query.

The above examples are valid for both Windows and Linux.





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "DNS reverse lookup in Windows 7 and Linux using - nslookup"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Unix reverse dns lookup - using dig command - PTR dns record type

mandrei99

1

13963

Tue Jan 13, 2015 4:48 am

mandrei99 View the latest post

There are no new unread posts for this topic. How to add IP alias in Debian Linux to last after reboot

debuser

3

4955

Sat Jul 21, 2012 6:03 am

Harespok View the latest post

There are no new unread posts for this topic. Linux: How to list IPv6 neighbors

mandrei99

0

3854

Thu Oct 09, 2014 3:11 am

mandrei99 View the latest post

There are no new unread posts for this topic. How to add (persistent) static ARP entries in Linux

mandrei99

0

31060

Mon Sep 29, 2014 5:17 am

mandrei99 View the latest post

There are no new unread posts for this topic. Linux How to change hardware MAC address of an interface

debuser

1

3599

Tue Dec 06, 2011 6:26 am

Zettie49 View the latest post

There are no new unread posts for this topic. How to dump kernel route cache in Linux

mandrei99

0

4800

Mon Jan 12, 2015 11:26 am

mandrei99 View the latest post

There are no new unread posts for this topic. Set up FTP PROXY via command line in Linux/FreeBSD

mandrei99

0

22860

Tue Jan 20, 2015 5:01 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Linux adding and removing vlan tagged interfaces

mandrei99

0

35575

Wed Aug 28, 2013 8:19 am

mandrei99 View the latest post

There are no new unread posts for this topic. Linux tso (tcp segmentation offload) - what it means and how to enable/disable it

mandrei99

0

51092

Fri Jan 16, 2015 5:41 am

mandrei99 View the latest post

There are no new unread posts for this topic. Linux script for interface network bandwidth monitoring

admin

0

3740

Mon Feb 09, 2015 7:05 pm

admin View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO