Poor Man’s Nmap

So I’m doing some server admin, but due to an upstream firewall issue I can’t use apt-get to install nmap. I need to do a simple port scan of some other hosts on the network, to see what ports they have open. Here’s how, using nc (Netcat):

nc -zv 10.1.1.13 1-5000 2>&1 |grep succeeded

Where 10.1.1.13 is the host, and 1-5000 are the ports to scan.

Since nc is lightning fast and I’m running this on a local network, I immediately get the following output:

Connection to 10.1.1.13 22 port [tcp/ssh] succeeded!
Connection to 10.1.1.13 80 port [tcp/www] succeeded!
Connection to 10.1.1.13 443 port [tcp/https] succeeded!

Leave a Reply