Resolve IP to Hostname?

Good day,

I would like to resolve IP's to Hostnames using Putty.
I'm using Mandriva Linux 2008.0.

Is this possible?
Perhaps with nmap?

Do you mean: I want the Putty title bar to display a hostname derived from an IP?

If you search the forums for putty title you will see examples of how to change the title bar. How you resolve the IP is your decision. most system types support nslookup.

Thank you for the reply.
But,

What I actually want it the get the hostname of an IP.

As Jim said try nslookup

Thank you for the suggestion.

Can you perhaps give me hint in the correct direction with nslookup?

I SSH into the Linux server,

type nslookup.

Then? How do I resolve the IP to hostname?

nslookup 1.2.3.111

run nslookup with an IP as the argument. The other way is too cumbersome for what you want.

Thank you Jim.

I will try that and get back to you.

---------- Post updated at 04:03 PM ---------- Previous update was at 03:54 PM ----------

If I do that, then I get this:

For the most part linux commands have "man" pages that are accessible by typing "man commandname" sans the quotes. At your prompt type man nslookup and the system documentation will display. You system man pages are an invaluable resource as you learn your system. Good luck.

Looks like your DNS server doesn't have a reverse lookup zone setup. You might try the command

host 192.168.8.101

but that will probably have the same result.

It also looks like you are using an external DNS server (probably from your ISP. iburst??) to try and do a reverse lookup on an internal address. That's not going to work.

Should I change my server in nslookup to the linux server?

mglenney,
How do you know iBurst?

A couple of things would have to be in place for this to happen. First, your network would have to have a DNS server in place that has a reverse lookup zone configured and that address would have to be in the zone file.

Next, you would have to specify that DNS server when you run NSLOOKUP. You can probably specify it from the command line but if you just run nslookup without any options you'll be running nslookup interactively (the prompt should change to '>'). You can then change the server at the > prompt. So, for example, if the DNS server you wanted to query was at 192.168.8.1 your request would look something like this:

[you@yourserver]$ nslookup
> server 192.168.8.1
Default server: 192.168.8.1
Address: 192.168.8.1#53
> 192.168.8.101
Server:      192.168.8.1
Address:    192.168.8.1#53

101.8.168.192.in-addr.arpa        name = some.server.host.name
>

I knew you were using iburst because you pasted the results of your nslookup which showed the IP of the DNS server you were using. Since the address you posted was internet routable I figured you were setup to use your ISP's DNS server instead of an internal one.

I did a reverse lookup on that IP:

[me@myserver ~]$ host 196.2.97.234
234.97.2.196.in-addr.arpa domain name pointer wbs-196-2-97-234.wbs.co.za.

I then did a whois lookup of wbs.co.za at domaintools.com and it told me that domain is owned by iburst.

Sorry - slow post

I see. Thanx for all the help. It actually makes sense.

Will try and get back to you.

Please read up on name service lookup. IP to host and host to IP can be resolved in two ways by default, using DNS or /etc/hosts file. You do not have DNS configured and that is reason for above error. You must have internal DNS to resolve this IP, or you add it manually to /etc/hosts file, then resolve it.

Dns client config file /etc/resolv.conf and nsswitch.conf