Network scanning · Open source (Nmap Public Source License, based on GPLv2)

Nmap

Nmap (Network Mapper) is a free, open-source network scanner used to discover hosts and services on a computer network. It sends specially crafted packets to target hosts and analyses the responses to map live systems, open TCP and UDP ports, running services, software versions and, with OS fingerprinting, the likely operating system. It is a standard first step in network reconnaissance and security auditing.

Last updated: 6 August 2026

What Nmap is actually used for

Security teams use Nmap to inventory what is exposed on a network: which hosts are up, which ports are open, and what is listening on them. A pentester runs it early to find an SSH service on 22, a web server on 80/443, or an unexpected database on 3306. Its NSE scripting engine extends it to version detection, misconfiguration checks and specific vulnerability probes. Sysadmins also use it to audit their own firewalls and confirm services are not unexpectedly reachable.

Platforms

Linux · Windows · macOS · BSD

Licence

Open source (Nmap Public Source License, based on GPLv2)

Commands worth knowing

nmap 192.168.1.0/24

Ping-scan an entire subnet to list which hosts are up.

nmap -sV -sC 10.10.10.5

Detect service versions and run the default NSE script set against a host.

nmap -p- 10.10.10.5

Scan all 65535 TCP ports instead of the default top 1000.

nmap -A -T4 target.tld

Aggressive scan: OS detection, version detection, scripts and traceroute at faster timing.

nmap -sn 192.168.1.0/24

Host discovery only (no port scan) to map live devices quickly.

nmap -sU --top-ports 20 10.10.10.5

Scan the 20 most common UDP ports (UDP is slow, so limit the range).

nmap --script vuln 10.10.10.5

Run the NSE vulnerability-detection script category against a target.

The legal line

Scan only networks and hosts you own or have explicit written permission to test. In India, port-scanning or probing systems you do not own can be treated as unauthorised access under Section 43 and Section 66 of the IT Act 2000. Even a bare port scan of a third party can trigger abuse complaints. Keep scope and authorisation in writing.

What Nmap is bad at

Nmap infers state from responses, so firewalls, rate-limiting and filtered ports can produce misleading or incomplete results. OS and version detection are best-effort guesses, not proof. Aggressive scans are noisy and easily logged by IDS. It maps exposure but does not itself exploit anything.

Alternatives, and when to pick them

ToolPick it when
MasscanYou need to scan huge address ranges or the whole internet at very high packet rates.
RustScanYou want to find open ports extremely fast and then hand them to Nmap for detail.
Angry IP ScannerYou want a simple, GUI host/port sweep on a local network.
ZenmapYou want Nmap itself with a graphical front end and saved scan profiles.
NaabuYou want a fast, scriptable port scanner that fits into automated recon pipelines.

Where we teach it

Ethical Hacking Course (6 months) — reconnaissance and scanning module

We are not affiliated with, endorsed by, or a reseller for the vendors of any tool on this site.

Nmap — FAQs

Is using Nmap illegal?

The tool is legal to install and use on networks you own or are authorised to test. Scanning systems without permission can be an offence under the IT Act, so authorisation is what matters, not the tool.

What is the difference between -sV and -A in Nmap?

-sV only probes open ports to identify the service and version. -A is a bundle that adds OS detection, default scripts and traceroute on top of version detection, so it is more thorough but far noisier.

How do I scan all ports with Nmap?

Use nmap -p- <target>, which covers all 65535 TCP ports. Add -sV to also fingerprint the services found on those ports.

Nmap kaise seekhein aur practice kahan karein?

Apne khud ke lab (VirtualBox mein Metasploitable ya ek local VM) par practice karein, kisi aur ke network par nahi. Hamare Ethical Hacking course ke scanning module mein hands-on labs milte hain.

Learn Nmap properly, in a legal lab

Free counselling call. We will tell you honestly whether a full course is worth it for what you actually want to do.

Call +91 75175 72000