tcpdump

Command-line packet analyzer for capturing and inspecting network traffic

brewmacoslinux
Try with needOr install directly
Source

About

Command-line packet analyzer

Commands

tcpdump

Examples

Capture packets on the default network interface$ tcpdump
Capture HTTP traffic on port 80 and save to a file$ tcpdump -i en0 -w capture.pcap port 80
Read and display packets from a capture file$ tcpdump -r capture.pcap