There are situations when you want to find a web server, or the CUPS server, or any other server in a local network, but you do not know the IP of that computer.
You can go to computer itself and check its IP, or you can check the DHCP logs, or you can ask the Network Admin, but you can also use
Using nmap to find open ports
First, be sure to use
nmap only in your own network, do not try to use it to scan ports of a computer that does not belongs to you, to me, find someone scanning ports at my computer is like finding some burglar outside my home watching for open windows. He might not be doing anything wrong yet, but surely has no good intentions.
Well, here is the how-to, let’s suppose you want to find a web server in your local network.
nmap -v -p80 192.168.0.1-255 | grep open
That will show you a list of servers with the port 80 (web) open. You can then use your browser to find which one you are looking for.
I’m sure there are other good-intentioned applications for this, do you have some?