ngrep
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:}}'
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.