Activer la detection avancee (OS, version, scripts)
-Pn
Ignorer la decouverte d'hôte (pas de ping)
Exemples
Scanner les ports courants d'un hote
$ nmap 192.168.1.1Starting Nmap 7.94 ( https://nmap.org )Nmap scan report for 192.168.1.1Host is up (0.0024s latency).Not shown: 997 closed portsPORT STATE SERVICE22/tcp open ssh80/tcp open http443/tcp open httpsNmap done: 1 IP address (1 host up) scannéd in 1.45 seconds
Scanner une plage de ports spécifique
$ nmap -p 1-1000 192.168.1.10Starting Nmap 7.94 ( https://nmap.org )Nmap scan report for 192.168.1.10PORT STATE SERVICE22/tcp open ssh80/tcp open http3306/tcp open mysqlNmap done: 1 IP address (1 host up) scannéd in 2.31 seconds
Detecter les versions des services
$ nmap -sV 192.168.1.10PORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.680/tcp open http nginx 1.24.03306/tcp open mysql MySQL 8.0.36
Scanner un sous-réseau complet
$ nmap -sn 192.168.1.0/24Nmap scan report for 192.168.1.1Host is up (0.0012s latency).Nmap scan report for 192.168.1.10Host is up (0.0008s latency).Nmap scan report for 192.168.1.25Host is up (0.0015s latency).Nmap done: 256 IP addresses (3 hosts up) scannéd in 4.52 seconds