nmap: which ports are visible from outside
cheat sheet · Ubuntu 24.04 · nmap 7.94 https://lab.dimsanych.ru/en/wiki/nmap/Cheat sheet
-
nmap 192.0.2.11000 common TCP ports -
nmap -p 22,80,5432,8080 192.0.2.1only these ports -
nmap -p- 192.0.2.1all 65535 ports -
nmap --open 192.0.2.1open ports only -
sudo nmap --reason -p 8080 192.0.2.1why this state -
sudo nmap -sV -p 22,80 192.0.2.1program and version -
sudo nmap -sU -p 53 192.0.2.1UDP -
nmap -Pn -p 22 192.0.2.1skip the "is it alive" check -
nmap -n -p 22 192.0.2.1no DNS — faster
Options
The main options are in the table below; the full list is in nmap
--help and man nmap. Options combine: `sudo nmap -sV --reason -p 22,80