Friday, April 8, 2011

Lightening fast way to find 'hosts' (routers, computers, unknown IP addresses) on your Local Area Network (LAN) Using Ubuntu Linux

Hi.

I turned on this computer on my network. This computer doesn't have a monitor nor is it even close to easy to find one and connect it. All I really needed to know was the stupid thing's IP address (or something close so that I could guess). Then I could just slip in the back door using VNC or SSH (or whatever other way you like to connect to a server-like computer).

I knew I had done this before but I had forgotten the simple way I did it. This post is so that I don't forget again and also to help others save a lot of time. I mean... a lot! Here's how it works.

1. Open your terminal

2. type this and get ready to enter your Ubuntu machine's master password:

sudo apt-get install nmap

3. Then, find the IP address for your gateway router (the first router after your modem, or, the actual modem itself it it doubles as a router)(The thing with an antenna if you are still confused..). Some of the common ones are 192.168.0.1 and 192.168.1.1. Mine randomly happens to be 10.100.2.1. Contact your manufacturer of that device if you can't figure it out or google a while.

4. now enter this command and fill in your details:

sudo nmap (add the IP address you found in #3 above here with a wildcard at the end)

example with mine:

sudo nmap 10.100.2.*

That's it. It will take a couple minutes and then produce this fairly detailed report about each IP address it finds.

Hope this helps you.