簡単にネットワークキャプチャ!<ngrep> | 伊藤くんの開発メモ

簡単にネットワークキャプチャ!<ngrep>

ngrepを使うと、ネットワークのキャプチャが簡単に行えます。
※インストールが必要です。

コマンドのは、以下の通りです。
・TCPポート番号80でフィルタリング
>ngrep -d eth0 tcp port 80 -W byline

・送信元IPでフィルタリング
>ngrep -d eth0 src 192.168.1.1 -W byline

・送信先IPでフィルタリング
>ngrep -d eth0 dst 192.168.1.1 -W byline

・送信元IPとポート番号80でフィルタリング
>ngrep -d eth0 src 192.168.1.1 and tcp port 80 -W byline


詳細は、参考URLを見て下さい。