Introduction to port scanning with nmap

TCP Connect Scanning – This is the most basic form of TCP scanning:

nmap -sT x.x.x.x

TCP SYN scanning – This is the “half-open” scanning, you don’t open a full TCP connection:

nmap -sS x.x.x.x

TCP FIN scanning – FIN packets may be able to pass through firewall which blocks SYN packets:

nmap -U x.x.x.x

TCP/UPD scanning – Scan TCP and UDP ports:

nmap -sU x.x.x.x

Operating System Detection:

nmap -O x.x.x.x

Service Version Detection:

nmap -sV x.x.x.x

Scan the host without ping it:

nmap -PN x.x.x.x


nmap -PO x.x.x.x

Fast port scanning:

nmap -F x.x.x.x

Specific ports scanning:

nmap -p 21,22,80 x.x.x.x

Operating System and Service Version Detection:

nmap -A x.x.x.x