Sponsored by

How to scan all ports with Nmap

Posted in Articles on February 21, 2018

How to scan all ports with Nmap

Hi, today’s tip is an Nmap option. It’s nothing extroardinary but I haven’t been aware of it for years and the day I stumbled on it, it has simply changed my life.
So I’m sharing it with you today on the off chance that you’re not using.

To scan all TCP ports of a target, I used to do:

nmap -p 0-65535	192.168.217.2

Since I have the memory of a goldfish, I had to look up the maximum port number (65535) every single time! Enter the following option:

nmap -p- 192.168.217.2

-p- is equivalent to -p 0-65535 and a lot easier to remember.


Please let me know if you have a comment, other Nmap tips, requests for tutorials, questions, etc.

See you next time!

Top