Nmap (Network Mapper) is a powerful, open-source tool for network discovery, security auditing, and vulnerability scanning, widely used by administrators and security professionals. Running Nmap on AvaHost’s high-performance Linux VPS, with NVMe SSDs and robust infrastructure, ensures efficient network analysis. This guide covers Nmap installation, key commands, and practical examples tailored for AvaHost VPS users, ensuring compliance with AvaHost’s policies to avoid prohibited actions like unauthorized scanning.
AvaHost Linux VPS (e.g., VPS Basic, €10/month) with Ubuntu, CentOS, or Debian.
Root or sudo access (ssh root@your-vps-ip).
Minimum 2GB RAM and 50GB NVMe for optimal performance.
A valid use case (e.g., scanning your own AvaHost servers or authorized networks).
Important: Ensure compliance with AvaHost’s Terms of Service (https://ava.hosting/terms-of-service/). Unauthorized scanning (e.g., DDoS, AMP scanning) is prohibited and may lead to account suspension.
Before using Nmap, ensure it is installed on your system. To install Nmap on different Linux distributions, use:
# Debian/Ubuntu
sudo apt install nmap
# CentOS/RHEL
sudo yum install nmap
# Arch Linux
sudo pacman -S nmap
For Windows and macOS, you can download Nmap from the official website.
To perform a simple scan on a target host, run:
nmap <target>
Example:
nmap 192.168.1.1
This command scans the specified IP address and lists the open ports and services.
To scan multiple hosts or an entire subnet, use:
nmap 192.168.1.1-100
or
nmap 192.168.1.0/24
To scan a specific port, use:
nmap -p 80 192.168.1.1
To scan multiple ports:
nmap -p 22,80,443 192.168.1.1
To scan all 65535 ports:
nmap -p- 192.168.1.1
To detect the operating system and running services on a target machine, use:
nmap -O 192.168.1.1
To get detailed service and version information:
nmap -sV 192.168.1.1
A stealth scan helps evade detection by firewalls and intrusion detection systems:
nmap -sS 192.168.1.1
Nmap can integrate with the Nmap Scripting Engine (NSE) to check for vulnerabilities:
nmap --script vuln 192.168.1.1
If you have a list of IP addresses in a file, you can scan them all at once:
nmap -iL targets.txt
To save the scan results for later analysis, use:
nmap -oN output.txt 192.168.1.1
For XML format:
nmap -oX output.xml 192.168.1.1
Nmap is a versatile and powerful tool for network scanning, security auditing, and penetration testing. Whether you’re identifying open ports, detecting running services, or checking for vulnerabilities, Nmap provides a comprehensive suite of features. Mastering Nmap is essential for any network administrator or cybersecurity professional.