[comp.unix.questions] Finding out domain name from IP number with nslookup. How?

lee@gdc.portal.com (Seng-Poh Lee, Gen DataComm, +1 203 758-1811) (02/18/91)

Hello,

I know this may not be the best place to post this, but here goes;

A while back I saw something posted regarding how to find out  a domain
name based on the IP number, using nslookup. It had something to do with
some option within nslookup but I don't remember what it was.

Could someone enlighten me or point me in the right direction for archived
newgroups? Thanks


Seng-Poh Lee			lee@gdc.portal.com

mcgough@wrdis01.af.mil (Jeffrey B. McGough) (02/19/91)

In article <4800@gdc.portal.com> lee@gdc.portal.com (Seng-Poh Lee, Gen DataComm, +1 203 758-1811) writes:
>A while back I saw something posted regarding how to find out  a domain
>name based on the IP number, using nslookup. It had something to do with
>some option within nslookup but I don't remember what it was.
>
Lets say you are looking for 26.6.0.83 (thats me)

You get into nslookup and type the following

set type=any

then
83.0.6.26.in-addr.arpa

and you should then get the host.domain info....

or you type
set type=PTR
then 83.0.6.26.in-addr.arpa
and you should then get the host.domain info....


--- 
Lator,                           Don't ask me what I think of you...
                                 Cuz I might not tell you what you want me to.
Jeffrey B. McGough
WR-ALC UNIX Systems Administrator                    (mcgough@wrdis01.af.mil)
-- 
Lator,                           Don't ask me what I think of you...
                                 Cuz I might not tell you what you want me to.
Jeffrey B. McGough
WR-ALC UNIX Systems Administrator                    (mcgough@wrdis01.af.mil)

weimer@garden.kodak.COM (Gary Weimer (588-0953)) (02/20/91)

In article <191@wrdis01.af.mil> you write:
|> In article <4800@gdc.portal.com> lee@gdc.portal.com (Seng-Poh Lee,
Gen DataComm, +1 203 758-1811) writes:
|> >A while back I saw something posted regarding how to find out  a domain
|> >name based on the IP number, using nslookup. It had something to do with
|> >some option within nslookup but I don't remember what it was.
|> >
|> Lets say you are looking for 26.6.0.83 (thats me)
|> 
|> You get into nslookup and type the following
|> 
|> set type=any
|> 
|> then
|> 83.0.6.26.in-addr.arpa
|> and you should then get the host.domain info....
|> 
|> or you type
|> set type=PTR
|> then 83.0.6.26.in-addr.arpa
|> and you should then get the host.domain info....

I prefer to use the aliases:

alias ns     '(echo server ispdgate;echo set q=any;echo \!*)|nslookup|grep \!*'
alias _nsn   'echo \!*|awk -F. '\''{print $4"."$3"."$2"."$1".in-addr.arpa"}'\'
alias nsn    '(echo server ispdgate;echo set q=PTR;_nsn
\!*)|nslookup|grep host'

ns is an nslookup by name (i.e. ns host.domain)
_nsn is used by nsn
nsn is an nslookup by number (i.e. nsn 26.6.0.83)

nsn basically does what the previous posting does, filtering out the
connect messges, etc. If you want to know the name server being used,
remove the grep command from ns and nsn.

weimer@ssd.kodak.com ( Gary Weimer )