Using `nmap` for Network Exploration and Security Auditing
`nmap` (Network Mapper) is a powerful open-source tool for network discovery and security auditing.
Common Scans
# Scan a single host to see which ports are open
nmap your_server_ip
# Perform a more aggressive scan to detect OS and service versions
sudo nmap -A your_server_ip
# Scan for UDP ports (slower)
sudo nmap -sU your_server_ip
# Scan the most common 100 ports (fast)
nmap --top-ports 100 your_server_ip
CopyRunning `nmap` against your own server from an external location is a great way to see what an attacker sees and to verify your firewall rules are working as expected.