Updated Dec 2, 2026

Network

Find live hosts across a range or list

fping is a high-performance alternative to ping that sends ICMP echo probes to network hosts in parallel, sweeping whole CIDR ranges and host lists in round-robin fashion instead of one target at a time.

installapt install fpingbrew install fping

C

overview

What fping does

fping sends ICMP echo requests to many hosts in parallel and reports which answered. Expand a netmask or start/end range with -g, or read targets from -f.

Reach for it when an IP block must shrink to live addresses before a port scan or HTTP probe. Dead hosts stay out of later stages.

fping prints each host as alive or unreachable, or only the alive ones with -a. Pair survivors with naabu or nmap for ports, or httpx for web probes. Prefer nmap -sn when you need richer host discovery in one tool.

source github.com/schweikert/fping

use cases

fping use cases

Sweep a CIDR block for live hosts

Pass a network and netmask with -g and fping expands it into every host, pings them in parallel, and returns the addresses that answered, trimming a /24 down to the machines that exist.

Ping a curated target file in one pass

Feed a file of addresses with -f to check liveness across an inventory list at once, instead of looping ping over each entry in a script.

Pre-filter an attack surface before scanning

Run fping ahead of a port scanner or HTTP prober so the slower tools only touch hosts that respond to ICMP, cutting wasted requests on an empty range.

Confirm reachability across an estate

Use the live-host list as a quick reachability snapshot for an IP range, the starting point for mapping which segments are populated.

reference

fping inputs and flags

2 inputs
NameTypeFlagDescription
generate-listSTRING-gGenerate a target list from an IP netmask or a starting and ending IP.
generate-from-fileFILE-fRead the list of targets from a file. This option can only be used by the root user.

Showing key inputs. fping exposes 2 inputs in total.

example

fping command examples

fping · command
# fping: expand a documentation CIDR and report live hosts
fping -g 198.51.100.0/24
Illustrative
198.51.100.10 is alive
198.51.100.24 is alive
198.51.100.55 is alive
203.0.113.8 is alive
203.0.113.44 is alive
192.0.2.17 is alive
# 6 hosts answered ICMP from the swept range

guidance

fping vs alternatives

Use fping to find which hosts in a CIDR or file answer ICMP before spending scanner time. It is a liveness sweeper, not a port or service scanner. Follow with naabu, nmap, or httpx.

ToolPick it when
nmapFull host and port scanner. Its -sn host-discovery mode covers the same liveness check plus far more, at a higher cost per run.
naabuFast port scanner with a host-discovery step. Use it when you need open ports, not just whether the host answers ICMP.
httpxHTTP prober, not an ICMP pinger. Run it after fping to classify live hosts that respond on web ports.

faq

fping FAQ

It pings many targets in parallel rather than one at a time, and it accepts a host list, a file of hosts, or a whole IP range. A wide sweep finishes without waiting on each host in turn.

Use -g with a netmask, for example fping -g 198.51.100.0/24. fping expands it into individual hosts, excluding the network and broadcast addresses, then pings each one.

Use -f when you already have a file of targets and want to ping that list. Use -g when you have a CIDR or start/end range and want fping to expand it. Note that -f requires root.

A port scanner such as naabu or nmap to find open services, or an HTTP prober such as httpx to classify web hosts. fping narrows a range to the live set those stages should target.

Not always. Firewalls and filtered networks can drop echo requests while the host still serves other ports. Treat fping as a pre-filter, not a complete inventory.