Skip to main content
Network Mapper (Nmap) commands for scanning.

About Nmap

  • Nmap scripts are programmed using Lua programming language
  • The default nmap scan type is TCP
  • The default nmap port scan is 1000
  • The default UDP scan scans all open ports instead of 1000
  • common nmap states:
    • open
    • closed
    • filtered (No answer)
    • open | filtered (It is 60% open, but the connection is 100% established)

Default nmap syntax

  • nmap <type> <arguments> target_ip

Basic Scans

Top 1000 TCP ports
Multiple targets
All TCP ports
Top N ports
Specific ports
Port range

Scan Types

SYN scan
TCP Connect
UDP
ACK / firewall filtering
ICMP host discovery
Skip host discovery

Service Enumeration

Service/version detection
OS detection
Default NSE scripts
Service + version + default scripts

NSE

Banner
Targeted script
Examples

Save Results

Save all formats
XML → HTML

Troubleshooting

Verbose
Packet trace
Disable DNS

Firewall / Filtering

Change source port
Decoys
Skip discovery + source port + decoys
Ncat source port

Useful commands