ngrep – A Network Packet Analyzer for Linux
Ngrep (network grep) is a simple yet powerful network packet analyzer. It is a grep-like tool applied to the network layer – it matches traffic passing over a network interface. It allows you to specify an extended regular or hexadecimal expression to match against data payloads (the actual information or message in transmitted data, but not auto-generated metadata) of packets.
This tool works with various types of protocols, including IPv4/6, TCP, UDP, ICMPv4/6, IGMP as well as Raw on a number of interfaces. It operates in the same fashion as tcpdump packet sniffing tool.
The package ngrep is available to install from the default system repositories in mainstream Linux distributions using package management tool as shown.
$ sudo apt install ngrep $ sudo yum install ngrep $ sudo dnf install ngrep
Read more at Tecmint