ngrep

Filter network traffic packets using regular expressions. More information: <https://github.com/jpr5/ngrep>.

Install

All systems
curl cmd.cat/ngrep.sh
Debian Debian
apt-get install ngrep
Ubuntu
apt-get install ngrep
Alpine
apk add ngrep
Arch Arch Linux
pacman -S ngrep
image/svg+xml Kali Linux
apt-get install ngrep
Fedora
dnf install ngrep
Windows (WSL2)
sudo apt-get update sudo apt-get install ngrep
OS X
brew install ngrep
Raspbian
apt-get install ngrep
Docker
docker run cmd.cat/ngrep ngrep powered by Commando

Filter network traffic packets using regular expressions. More information: <https://github.com/jpr5/ngrep>.

  • Capture traffic of all interfaces:
    ngrep -d any
  • Capture traffic of a specific interface:
    ngrep -d eth0
  • Capture traffic crossing port 22 of interface eth0:
    ngrep -d eth0 port 22
  • Capture traffic from or to a host:
    ngrep host www.example.com
  • Filter keyword 'User-Agent:' of interface eth0:
    ngrep -d eth0 'User-Agent:'

© tl;dr; authors and contributors