nmap

nmap - Network exploration tool and security / port scanner.


Scan a server using hostname:

nmap server.your-site.com

Scan a server using IP address:

nmap 192.168.0.1

Scan a server showing detailed information:

nmap -v 192.168.0.1

Scan multiple servers:

nmap 192.168.0.1 192.168.0.2 192.168.0.3
nmap 192.168.0.1,2,3

Scan an IP Address Range:

nmap 192.168.0.1-10

Scan a whole subnet:

nmap 192.168.0.*

Scan a whole subnet excluding some hosts:

nmap 192.168.0.* --exclude 192.168.0.5

Scan servers from a text file:

nmap -iL server-list.txt

Scan OS information and traceroute:

nmap -A 192.168.0.1

Enable OS detection with nmap:

nmap -O server.your-site.com

Scan a host to detect firewall:

nmap -sA 192.168.0.1

Scan online hosts in a network:

nmap -sP 192.168.0.*

Scan host in fast mode:

nmap -F 192.168.0.1

Scan ports consecutively:

nmap -r 192.168.0.1

Print host interfaces and routes:

nmap --iflist

Scan for specific port:

nmap -p 80 server.your-site.com

Scan a specific TCP port:

nmap -p T:80 server.your-site.com

Scan a specific UDP port:

nmap -p U:53 server.your-site.com

Scan multiple ports:

nmap -p 80,443 192.168.0.1

Scan ports range:

nmap -p 80-160 192.168.0.1

Scan host services version numbers:

nmap -sV 192.168.0.1

Scan remote hosts using TCP ACK (PA) and TCP Syn (PS):

nmap -PS 192.168.0.1

Scan remote host for specific ports with TCP ACK:

nmap -PA -p 22,80 192.168.0.1

Scan remote host for specific ports with TCP Syn:

nmap -PS -p 22,80 192.168.0.1

Scan in stealthy mode:

nmap -sS 192.168.0.1

Check most commonly used Ports with TCP Syn:

nmap -sT 192.168.0.1

Perform a tcp null scan to fool a firewall:

nmap -sN 192.168.0.1

Find nmap version:

nmap -V