ZMAP(1)
๐ zmap ๐
okay bestie, welcome to the manual page for zmap(1) โ yes, that's the fast internet scanner and yes it's iconic. buckle up, this is a long one and we're doing it together. ๐ซถ
โจ NAME โจ
zmap โ The Fast Internet Scanner ๐
๐ธ SYNOPSIS ๐ธ
zmap [ -p <port(s)> ] [ -o <outfile> ] [ OPTIONS... ] [ ip/hostname/range ]
๐ฆ DESCRIPTION ๐ฆ
ZMap is a network tool for scanning the entire IPv4 address space (or large samples). bestie, it is fast fast. ZMap can scan the whole entire Internet in around 45 minutes on a gigabit network connection, hitting ~98% theoretical line speed. that's not a vibe, that's a flex. ๐
๐ OPTIONS ๐
๐ BASIC OPTIONS ๐
ip/hostname/rangeโ the IP addresses or DNS hostnames you wanna scan, bestie. it accepts IP ranges in CIDR block notation. defaults to0.0.0/8. (yes, that's the default, no cap.)-p,--target-ports=port(s)โ a list of TCP/UDP ports and/or port ranges to scan, like80,443,100-105. use*to scan all ports, port 0 included. slay.-o,--output-file=nameโ when you're using an output module that uses a file, write the results here. use-for stdout. ๐-b,--blocklist-file=pathโ a file of subnets to exclude, in CIDR notation, one per line. highly recommend you use this to exclude RFC 1918 addresses, multicast, IANA reserved space, and other IANA special-purpose addresses. there's an example blocklist fileblocklist.conffor exactly this purpose. ๐-w,--allowlist-file=pathโ a file of subnets to scan, in CIDR notation, one per line. specifying an allowlist file is equivalent to specifying ranges directly on the command line interface, but it lets you specify a large number of subnets. note: if you're specifying a large number of individual IP addresses (more than 10 million), you should instead use--list-of-ips-file.-I,--list-of-ips-file=pathโ a file of individual IP addresses to scan, one per line. this feature lets you scan a large number of unrelated addresses. if you have a small number of IPs, it's faster to specify them on the command line or by using--allowlist-file. this should only be used when scanning more than 10 million addresses. when used in with--allowlist-path, only hosts in the intersection of both sets will be scanned. hosts specified here but included in the blocklist will be excluded. periodt. โจ
๐ฅ SCAN OPTIONS ๐ฅ
-r,--rate=ppsโ set the send rate in packets/sec. note: when combined with--probes, this is total packets per second, not IPs per second. setting the rate to0will scan at full line rate. default:10000pps. ๐-B,--bandwidth=bpsโ set the send rate in bits/second (supports the suffixesG,M, andK, e.g.-B 10Mfor 10 mbps). this overrides the--rateflag. highkey powerful.-n,--max-targets=nโ cap the number of targets to probe. this can either be a number (e.g.-n 1000) or a percentage (e.g.-n 0.1%) of the scannable address space (after excluding the blocklist). a target is an IP/port pair if you're scanning multiple ports, and an IP otherwise. in the case of percents and multiple ports, the percent is of the total number of IP/port pair combinations. ๐ง-N,--max-results=nโ exit after receiving this many results.-t,--max-runtime=secsโ cap the length of time for sending packets.-c,--cooldown-time=secsโ how long to keep receiving after sending has completed (default=8). let it cook. ๐ณ-e,--seed=nโ the seed used to select the address permutation. use this if you want to scan addresses in the same order across multiple ZMap runs.-P,--probes=nโ number of probes to send to each IP/Port pair (default=1). probes are sent sequentially for a given IP/Port, so if--probes=4, we'll send 4 probe packets sequentially to that target rather than iterating across the target space 4 times. since ZMap composes Ethernet frames directly, probes can be lost en-route to destination. increasing--probesincreases the chance that an online host will receive a probe on an unreliable network. this is contrasted with--retries, which just gives the number of attempts to send a single probe on the source NIC. ๐ (not the same thing, bestie!)--retries=nโ number of times to try resending a packet if thesendtocall fails (default=10).--batch=nโ number of packets to batch before calling the appropriate syscall to send. used to take advantage of Linux'ssendmmsgsyscall to send the entire batch at once. only available on Linux, other OS's will send each packet individually. (default=64)
๐ SCAN SHARDING ๐
--shards=Nโ split the scan up intoNshards/partitions among different instances of zmap (default=1). when sharding,--seedis required. don't forget it, bestie.--shard=nโ set which shard to scan (default=0). shards are 0-indexed in the range[0, N), whereNis the total number of shards. when sharding,--seedis required.
๐ NETWORK OPTIONS ๐
-s,--source-port=port|rangeโ source port(s) to send packets from.--validate-source-port=enable|disableโ used as an override to enable/disable source port validation. source port validation checks that a received probe response's src port matches the dst port of the probe sent to that IP/port pair. this ensures that multiple ZMap scans to the same hosts but to different ports will not interfere with each other. this overrides each module's default behavior on whether or not to validate source ports with probe responses.-S,--source-ip=ip|rangeโ source address(es) to send packets from. either a single IP or a range (e.g.10.0.0.1-10.0.0.9).-G,--gateway-mac=addrโ gateway MAC address to send packets to (in case auto-detection fails). ๐--source-mac=addrโ source MAC address to send packets from (in case auto-detection fails).-i,--interface=nameโ the network interface to use.-X,--iplayerโ send IP layer packets instead of ethernet packets (for non-Ethernet interfaces).--netmap-wait-ping=ipโ (Netmap only) wait for ip to respond to an ICMP Echo request before commencing the scan. useful if you're connected to a switch with STP enabled, where the PHY reset that's needed for entering and leaving Netmap mode will cause the switch to mute the port until the spanning tree protocol has determined that the link should be set into forward state. iykyk. ๐ธ
๐ง PROBE OPTIONS ๐ง
ZMap lets users specify and write their own probe modules, bestie. probe modules are responsible for generating the probe packets to send, and processing responses from hosts. main character energy, honestly.
--list-probe-modulesโ list available probe modules (e.g.tcp_synscan).-M,--probe-module=nameโ select the probe module (default=tcp_synscan).--probe-args=argsโ arguments to pass to the probe module.--probe-ttl=hopsโ set the TTL value for probe IP packets.--list-output-fieldsโ list the fields the selected probe module can send to the output module. ๐
๐ OUTPUT OPTIONS ๐
ZMap lets users specify and write their own output modules for use with ZMap. output modules are responsible for processing the fieldsets returned by the probe module, and outputting them to the user. users can specify output fields, and write filters over the output fields. so much freedom fr fr.
--list-output-modulesโ list available output modules (e.g.csv).-O,--output-module=nameโ select the output module (default=csv).--output-args=argsโ arguments to pass to the output module.-f,--output-fields=fieldsโ comma-separated list of fields to output.--output-filterโ specify an output filter over the fields defined by the probe module. see the output filter section for more details. ๐--no-header-rowโ excludes any header rows (e.g., CSV header fields) from ZMap output. this is useful if you're piping results into another application that expects only data. very "just give me the data" of it. ๐
๐ RESPONSE DEDUPLICATION ๐
hosts will oftentimes send multiple responses to a probe (either because the scanner doesn't send back a RST packet or because the host has a misimplemented TCP stack). to address this, ZMap will attempt to deduplicate responsive (ip,port) targets. so thoughtful of it. ๐ญ
--dedup-methodโ specifies the method ZMap will use to deduplicate responses. options are:full,window, andnone. full deduplication uses a 32-bit bitmap and guarantees that no duplicates will be emitted. however, full-deduplication requires around500MBof memory for a single port. we do not support full deduplication for multiple ports. window uses a sliding window of the last (user-defined) number of responses as set by--dedup-window-size. none will prevent any deduplication. ๐ซถ--dedup-window-size=targetsโ specifies the size of the sliding window as the last n target responses to be used for deduplication. only applicable if using window deduplication.
๐ LOGGING AND METADATA OPTIONS ๐
-q,--quietโ do not print status updates once per second. (shhh ๐คซ)-v,--verbosity=nโ level of log detail (0-5, default=3).-l,--log-file=filenameโ output file for log messages. by default,stderr.-m,--metadata-file=filenameโ output file for scan metadata (JSON).-L,--log-directoryโ write log entries to a timestamped file in this directory.-u,--status-updates-fileโ write scan progress updates to CSV file.--disable-syslogโ disables logging messages to syslog.--notesโ inject user-specified notes into scan metadata.--user-metadataโ inject user-specified JSON metadata into scan metadata.
โญ ADDITIONAL OPTIONS โญ
-T,--sender-threads=nโ threads used to send packets. ZMap will attempt to detect the optimal number of send threads based on the number of processor cores. defaults tomin(4, number of processor cores on host - 1).-C,--config=filenameโ read a configuration file, which can specify any other options.-d,--dryrunโ print out each packet to stdout instead of sending it (useful for debugging). look ma, no packets! ๐--fast-dryrunโ don't actually send packets, print out a binary representation of probe dst IP and dst Port. used for faster integration tests, not for general use.--max-sendto-failuresโ maximum NIC sendto failures before the scan is aborted.--min-hitrateโ minimum hitrate that the scan can hit before the scan is aborted.--coresโ comma-separated list of cores to pin to. ๐--ignore-blocklist-errorsโ bestie, if your allowlist/blocklist file has entries that are invalid, malformed, or just plain unresolvable (like, they ghosted DNS entirely ๐), this makes ZMap shrug and move on instead of throwing a fit. Heads up though: this is the glow-up replacement for the old pre-v3.x--ignore-invalid-hostsoption. same energy, new name.-h,--helpโ prints the help text and dips out. classic. โจ-V,--versionโ prints the version and exits. that's it, that's the whole job ๐
๐ OUTPUT FILTERS ๐
Okay so here's the tea: whatever your probe module spits out can get filtered before it ever reaches the output module. No messy data in your results file, we're gatekeeping. ๐ชโจ
Filters are defined over the output fields of a probe module, and they're written in a simple filtering language that's giving very SQL, very structured, very demure. You hand them to ZMap with the --output-filter option. People use these constantly to yeet duplicate results, or to let only the successful responses through to the output module. success only, no crumbs.
Filter expressions look like this:
<fieldname> <operation> <value>
The type of <value> has to be either a string or an unsigned integer literal, and it has to match the type of <fieldname>. Like, type-matching is the vibe check here. mismatch = rejected, sorry babe ๐
The valid operations for integer comparisons are =, !=, <, >, <=, >=.
The operations for string comparisons are =, !=.
And if you wanna know what fields and types are even available for the probe module you picked? Run the --list-output-fields flag. It prints all of that and then exits. king behavior honestly. ๐
Wanna get fancy? You can build compound filter expressions by combining filter expressions with parenthesis to specify order of operations, plus the && (logical AND) and || (logical OR) operators. yes, it's giving boolean algebra and it's serving. ๐งฎ
For example, a filter for only successful, non-duplicate responses would be written as:
--output-filter="success = 1 && repeat = 0"
look at that. beautiful. no duplicates, all success, main character results only. ๐
๐ฆ UDP PROBE MODULE OPTIONS ๐ฆ
These arguments are all passed using the --probe-args=args option. And listen โ only one argument may be passed at a time. one. singular. don't get greedy bestie. ๐
โโ๏ธ
file:/path/to/fileโ path to the payload file that gets sent to each host over UDP. ๐template:/path/to/templateโ path to a template file. For each destination host, the template file gets populated, set as the UDP payload, and sent. it's customizable, it's personal, it's iconic. โจtext:<text>โ ASCII text to send to each destination host. straightforward. we love a simple queen. ๐hex:<hex>โ hex-encoded binary to send to each destination host. for when your payload is too cool for ASCII. ๐ฅtemplate-fieldsโ prints info about all the allowed template fields and exits. very "let me show you the menu" of it. ๐
โญ MID-SCAN CHANGES โญ
You can change the rate at which ZMap is scanning mid-scan. like, live. on the fly. no restart, no drama. ๐ฆ
How? Send signals to ZMap:
SIGUSR1โ increase the scan rate ๐SIGUSR2โ decrease the scan rate ๐
And these will result in the scan rate increasing or decreasing by 5%. small steps, steady progress, we love a controlled glow-up. ๐
ngl this is the part where you go forth and scan responsibly. ZMap said what it said. periodt. ๐
that's a wrap on the page bestie โ ZMap, November 2025, ZMAP(1) โ version and date and everything, so you know exactly which era of this manual you're reading. ๐ซถ๐ธ
๐ฆ where this page comes from
- arch rolling: zmap 4.4.0-1 ยท Apache-2.0
- epel 10: zmap 4.4.0-1.el10_3 ยท Apache-2.0
- fedora 43: zmap 4.4.0-1.fc43 ยท Apache-2.0
- fedora 44: zmap 4.4.0-1.fc44 ยท Apache-2.0
- nixpkgs unstable: zmap 4.4.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms