LinuxCommandLibrary

tcpflow

Reconstruct TCP data streams

TLDR

Capture and display traffic on interface and port

$ tcpflow -c -i [eth0] port [80]
copy

SYNOPSIS

tcpflow [OPTIONS] [EXPRESSION]

DESCRIPTION

tcpflow captures TCP traffic and reconstructs data streams for debugging and analysis. Unlike packet sniffers that show individual packets, tcpflow reassembles TCP connections into complete data flows.
Each TCP flow is saved to a separate file named by source and destination addresses/ports, making it easy to analyze individual connections.

PARAMETERS

-c

Output to console (stdout)
-i INTERFACE
Capture on specified interface
-r FILE
Read from pcap file
-o DIR
Output directory for flow files
-a
Output in ASCII format
-e SCANNER
Enable specific scanner

CAVEATS

Requires root privileges or appropriate capabilities. Uses libpcap filter expressions. Only captures TCP traffic, not UDP or other protocols. Large captures can consume significant disk space.

HISTORY

tcpflow was created by Jeremy Elson and is designed for forensic analysis and debugging of network applications by reconstructing TCP sessions.

SEE ALSO

tcpdump(8), wireshark(1), tcpick(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community