Here are some basic Nmap commands that you can use for network scanning:
-
Basic Host Discovery:
nmap <target>This command scans the specified target (IP address or hostname) to discover open ports.
-
Scan Specific Ports:
nmap -p <port1,port2,...> <target>This command scans specific ports on the target. For example, to scan ports 80 and 443:
nmap -p 80,443 <target> -
Operating System Detection:
nmap -O <target>This command enables OS detection to identify the operating system of the target.
-
Service Version Detection:
nmap -sV <target>This command detects the versions of services running on open ports.
-
Aggressive Scan:
nmap -A <target>This command performs an aggressive scan, which includes OS detection, version detection, script scanning, and traceroute.
-
Scan a Range of IPs:
nmap <start_ip>-<end_ip>This command scans a range of IP addresses. For example:
nmap 192.168.1.1-10 -
Save Output to a File:
nmap -oN <filename> <target>This command saves the scan results to a specified file. For example:
nmap -oN scan_results.txt <target>
These commands provide a foundation for using Nmap effectively in network reconnaissance and security assessments.
