Nmap vs RustScan: Port Scanning Speed Compared

Compare Nmap and RustScan for port scanning: raw scan speed, the hand-off to Nmap for service detection, accuracy trade-offs, firewall behaviour and when the speed advantage is real.

Short answer: RustScan is not an Nmap replacement - it is a faster way to find open ports, and its own documentation tells you to pipe the result into Nmap for everything else. Use RustScan when a full 65,535-port sweep is the bottleneck; use Nmap directly when you need service detection, OS fingerprinting, NSE scripts, or when the network is fragile.

Executive Verdict: When to Choose Each

Choose Nmap if…

Best for the part of the job RustScan cannot do: service and version detection, OS fingerprinting, NSE script libraries, UDP scanning, output in five formats, and scan tuning that survives packet loss and rate limiting.

Choose RustScan if…

Best for the one thing it does: finding open ports across all 65,535 of them in seconds, then handing those ports to Nmap automatically so the slow part of the scan is skipped entirely.

Feature-by-Feature Technical Matrix

Dimension Nmap RustScan
Written in C++ with a Lua scripting engine Rust
Primary purpose The whole scan: discovery, ports, services, scripts, OS, output Port discovery only, designed to feed another tool
All-ports scan time Minutes - roughly 1,000-3,000 packets per second by default, tunable with --min-rate Seconds - thousands of ports per second by default, adaptive to the host
Service / version detection Built in (-sV), with intensity levels and version probes Not supported - it detects whether a port answers, not what is behind it
OS fingerprinting -O, with a maintained fingerprint database Not supported
Scripting NSE - a large library of Lua scripts for TLS, SMB, HTTP, vuln checks Not supported
UDP scanning -sU, with service detection for common UDP services TCP focused; UDP is not the use case
Hand-off to Nmap Not applicable Built in: -sV runs Nmap against the discovered ports automatically
Adaptive behaviour Manual tuning: -T4, --min-rate, --max-retries Automatic - it backs off when the host starts dropping packets
Output formats Normal, XML, grepable and the "all" flag (-oA) Plain list by default; Nmap formats once handed off
Firewall and IDS behaviour Configurable stealth, fragmenting, decoys, source-port tricks Loud by design - thousands of packets per second look like a scan
Licence NPSL (Nmap Public Source Licence) - open source with redistribution conditions GPL-3.0
Best first use A careful, complete assessment of a host you are authorised to test A quick answer to "which of the 65,535 ports are even open" on a lab or CTF target

The comparison is really about one flag

Most "Nmap vs RustScan" arguments are not comparing two scanners. They are comparing two workflows for the same job, and the difference is where the time goes.

A default Nmap scan checks the 1,000 most common ports. A full scan checks 65,535, and that is where the minutes disappear - not in detecting services, but in sending 65,535 probe packets and waiting for silence on each. RustScan attacks exactly that step. It opens many connections concurrently, closes them immediately, and records which ones succeeded, so the exhaustive part of the job finishes in seconds rather than minutes.

Then it does the sensible thing: it takes the handful of ports that answered and runs Nmap against only those, with service detection. The result is an ordinary Nmap result, produced without spending time on 65,000 closed ports. That is why the two tools are usually described as complementary rather than competing.

  • If your scan target is a single host with a handful of open ports, RustScan saves minutes.
  • If you are scanning a /24, the time saved multiplies per host - and so does the noise you make.
  • If you need UDP, OS detection or NSE output, Nmap was always going to run anyway.

Speed has a cost, and the cost is detection

Sending thousands of connection attempts per second is not subtle. On a lab network nobody minds. Against a production system with an IDS, a WAF or a rate limiter, a RustScan run is one of the easiest things to detect and block, and it may also degrade the service you were asked to test.

Nmap gives you a dial for this. -T4 is the common compromise, --min-rate bounds the floor, --max-retries controls how patiently it waits after a dropped packet, and options like --scan-delay spread requests out. A scan that takes an hour but completes is more useful than a scan that takes ten seconds and gets you blocked two thirds of the way through.

RustScan adapts automatically - it reduces concurrency when the host stops responding - which is better than nothing and still not a substitute for deliberately choosing a rate before you start. The honest rule: on a lab, let it run fast; on anything that matters, set the batch size and timeout yourself.

When RustScan is genuinely the wrong tool

Three situations come up often enough to name.

First, anything UDP. Most interesting UDP services - DNS, SNMP, NTP, IKE, TFTP - do not answer a connection the way TCP does, and a tool built around fast TCP connects has nothing to say about them. Nmap -sU is still the answer.

Second, fragmented or lossy networks. A VPN, a satellite link or a heavily filtered path drops packets, and a scanner that assumes silence means "closed" will report open ports as closed. Nmap retries and distinguishes filtered from closed; a fast connect-scan often cannot.

Third, when the report matters. Nmap produces XML with service banners, script output and evidence that an assessor can attach to a finding. A list of open ports is a starting point, not a deliverable.

Side-by-Side CLI & Operational Workflow

Nmap Example

# Full TCP sweep with service detection, saved in every format
sudo nmap -sS -p- --min-rate 1000 -T4 -sV -oA full-scan {TARGET}

# Targeted service and script scan on the ports that answered
sudo nmap -sV -sC -p 22,80,443,3306 {TARGET} -oA services

RustScan Example

# Discover open ports fast, then hand them to Nmap for detection
rustscan -a {TARGET} --ulimit 5000 -- -sV -sC

# Bound the rate explicitly on a host that should not be hammered
rustscan -a {TARGET} --batch-size 200 --timeout 2000 -- -sV

Frequently Asked Questions

Does RustScan replace Nmap?

No, and its own documentation says so. RustScan finds open ports quickly and can pass them to Nmap for service detection. Everything Nmap is known for - version probes, OS fingerprints, NSE scripts, UDP, output formats - is still Nmap.

How much faster is RustScan really?

For a full 65,535-port TCP scan on a host with a few open ports, the difference is typically seconds versus minutes. For a default top-1,000-port scan the gap is much smaller, because there is far less work to skip. If you usually scan the default port set, the speed advantage is close to irrelevant.

Why did RustScan report a port as closed that Nmap shows as open?

Usually packet loss or rate limiting. RustScan retries a limited number of times and moves on, so on a lossy path a slow reply can be treated as no reply. Lower the batch size, raise the timeout, or confirm the finding with Nmap before writing it down.

Will a fast scan get me blocked?

Possibly, and on a production system that is a real outcome rather than a theoretical one. Thousands of connection attempts per second are easy to detect. Set an explicit rate, scan outside business hours if you have authorisation for that, and never run it against a system you do not own.

Can I use the --ulimit advice I see everywhere?

Raising the open-file limit lets RustScan run more concurrent connections, which is where the speed comes from. On modern systems the Docker image or the packaged build often handles it. If RustScan warns about file descriptors, that warning is the instruction.


Related Tools, Cheat Sheets & Comparisons