Where to start First steps track · 15 stages
Linux Labs

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.1 1000 common TCP ports
  • nmap -p 22,80,5432,8080 192.0.2.1 only these ports
  • nmap -p- 192.0.2.1 all 65535 ports
  • nmap --open 192.0.2.1 open ports only
  • sudo nmap --reason -p 8080 192.0.2.1 why this state
  • sudo nmap -sV -p 22,80 192.0.2.1 program and version
  • sudo nmap -sU -p 53 192.0.2.1 UDP
  • nmap -Pn -p 22 192.0.2.1 skip the "is it alive" check
  • nmap -n -p 22 192.0.2.1 no 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

`.
Loading…