安装

$ yum install ngrep
$ apt-get install ngrep

使用

  1. 查看端口的请求

ngrep -W byline port 80

  1. 过滤请求

ngrep -W byline -i "^GET |^POST " port 80

参考资料

  1. https://en.wikipedia.org/wiki/Ngrep