Nmap

The standard scanner for finding hosts on a network, the ports they have open, and the services running on them.

cat nmap/meta.ymlChecked on 2026-10-25

Safety

Impact Reaches othersSees other people's traffic or sends traffic to their devices
Admin rights
Required
Test lab
Required

Usage

Purpose
Audit
Difficulty
Intermediate
Type
Command line
Platforms
Linux / macOS / Windows

Trust

Repository
nmap/nmap
License
Check termsNmap Public Source License
GitHub
stars13,8712026-10-25
Maintenance
Actively updatedLast update 2026-10-24
Contents
  1. Introduction
  2. What Nmap is for
  3. Install
  4. Try it safely
  5. Read the results
  6. Common options
  7. Why it needs admin rights
  8. Cautions
  9. Read next
  10. Sources

Nmap shows you which devices are on a network, which ports each one has open, and what services are running on them. Start by scanning your own computer, then move on to virtual machines you set up yourself.

This review is for people who know the basics of IP addresses and ports. After reading it, you can do the following:

  • List the open ports on your own computer
  • Tell the port states in the results apart (open, closed, and filtered)
  • Find out which service and version is running on a port

What Nmap is for

Nmap started as a port scanner, and that is still its core job. It can also do the following:

  • Host discovery: find which IP addresses in a range have a device on them (-sn)
  • Service and version detection: identify the software and version behind an open port (-sV)
  • OS detection: guess the operating system from how the target’s packets look (-O)
  • Script scanning: collect more detail with scripts written in Lua (NSE) (-sC)

For administrators, the main use is checking that their own network has no ports open that they didn’t expect.

What it doesn’t doUnlike Wireshark, Nmap sends packets and studies how the target responds. It is not a passive observer. Its results are inferred from the packets that come back, so they depend on the target and on any firewall in front of it.

Install

Get Nmap from the official download page.

  • Windows: run the installer (nmap-<version>-setup.exe). It also installs Npcap, which Nmap uses to send and receive packets, and the Zenmap GUI. The project supports Windows 7 and later.
  • macOS: use the installer inside the disk image (.dmg).
  • Linux: the project provides RPM packages and source code.

After installing, run nmap -V in a terminal to check that it prints a version number.

Try it safely

Nmap sends packets to other devices, so decide on your target first.

  1. Scan your own computer. Run this in a terminal. The traffic never leaves your machine.

    nmap 127.0.0.1

    On Windows, scanning your own machine requires Npcap. The installer’s default settings include it.

  2. Scan virtual machines you set up yourself. Put them on an internal network with no outside connection and scan their IP addresses (see How to set up a safe test lab).

  3. To try a scan over the internet, use scanme.nmap.org. The Nmap project set up this server and says you may scan it with Nmap. Keep it to a few scans a day.

Read the results

Running nmap <target> with no options scans 1,000 common TCP ports. Each port in the results gets a state. These are the ones you will see most:

State Meaning
open An application is accepting connections
closed The port is reachable, but nothing is listening
filtered A firewall or filter blocks the probes, so Nmap can’t tell whether it’s open

Nmap uses six states in total. The other three are unfiltered, open|filtered, and closed|filtered. A state describes how the port looks to Nmap, not a property of the port itself. The same port can show as open from inside the network and filtered from across the internet.

Common options

Option What it does
-p 22,80,443 Scan only these ports (-p- scans all ports)
-F Scan fewer ports than the default, for a quicker result
-sn Skip the port scan and only check which hosts are up
-sV Detect the service and version on open ports
-O Guess the operating system
-A Run OS detection, version detection, scripts, and traceroute together
-oN results.txt Save the results to a file (-oX for XML)

For example, nmap -sV -p 22,80 127.0.0.1 checks what is running on ports 22 and 80 of your own computer.

Why it needs admin rights

The default scan is a SYN scan (-sS). It builds and sends raw packets, which requires root on Linux and macOS. Without those rights, Nmap falls back to a connect scan (-sT), which uses the operating system’s normal connection calls. A connect scan works without special rights but is slower. On Windows, the project recommends running Nmap as an administrator.

Cautions

  • Don’t scan networks or devices you don’t have permission to scan. The project’s legal guide recommends getting written permission from the target’s administrators first. For work, agree on the targets and the time window in writing before you start.
  • Scanning without permission can lead the target’s administrators to complain to your internet provider, and it can break your provider’s terms of service.
  • Nmap is designed not to overload networks, but older devices have occasionally crashed during a scan. On a work network, test at a time when an outage would not cause problems.
  • Nmap uses its own license, the Nmap Public Source License, which is based on GPLv2 with added terms. Individuals and organizations can use it for free, but embedding it in a commercial product you distribute is not allowed. Read the official terms if you plan to do that.

Sources

  1. Download pagenmap.org/download.html
  2. Install Guide: Windowsnmap.org/book/inst-windows.html
  3. Reference: Options summarynmap.org/book/man-briefoptions.html
  4. Reference: Port scanning basicsnmap.org/book/man-port-scanning-basics.html
  5. Reference: Port scanning techniquesnmap.org/book/man-port-scanning-techniques.html
  6. Legal issuesnmap.org/book/legal-issues.html
  7. scanme.nmap.org (a server you may scan)scanme.nmap.org
  8. Nmap Public Source Licensenmap.org/npsl/

Checked on 2026-10-25

Similar tools

Suricata

Impact Reaches others
OISF/suricata

An intrusion detection and prevention engine (IDS/IPS) that matches network traffic against rules and records suspicious activity as alerts.

Purpose
Defense
Type
Self-hosted server
Difficulty
Intermediate
License
CopyleftGPL-2.0
Category
Network
Actively updatedstars6,773Last update 2026-10-23
Read the Suricata review

Web-Check

Impact Reaches others
lissy93/web-check

An OSINT tool that shows a website's public information, such as DNS, certificates, and headers, from a single URL.

Purpose
Audit
Type
Web service
Difficulty
Beginner
License
PermissiveMIT
Category
Reconnaissance / Web security
Actively updatedstars35,219Last update 2026-10-25
Read the Web-Check review

Wireshark

Impact Reaches others
wireshark/wireshark

A packet analyzer that records network traffic and breaks each packet down by protocol so you can read it.

Purpose
Learning
Type
Desktop app
Difficulty
Beginner
License
CopyleftGPL-2.0
Category
Network / Forensics
Actively updatedstars10,082Last update 2026-10-25
Read the Wireshark review