Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!clyde.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!rex!wuarchive!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!kodak!ispd-newsserver!garden!weimer From: weimer@garden.kodak.COM (Gary Weimer (588-0953)) Newsgroups: comp.unix.questions Subject: Re: Finding out domain name from IP number with nslookup. How? Message-ID: <1991Feb19.181206.29212@ssd.kodak.com> Date: 19 Feb 91 18:12:06 GMT References: <4800@gdc.portal.com> <191@wrdis01.af.mil> Sender: news@ssd.kodak.com Reply-To: weimer@ssd.kodak.com Organization: Eastman Kodak Co.; Rochester, NY Lines: 39 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 )