wiresharkは使い勝手が良いが、長時間キャプチャする時にGUIを不要としたい。screenから起動しておけばいいな。。。
コマンド例
tshark -i2 -tad -b duration:300 -w ./test.pcap
オプション
-D print list of interfaces and exit
-L print list of link-layer types of iface and exit
--list-time-stamp-types print list of timestamp types for iface and exit
-i インタフェースID
-w 出力ファイル名(.pcap)
-b filesiez:SIZE-KB
-b duration:秒
-b files:ファイル数(ローテート)
-t 時刻フォーマット
-t a|ad|d|dd|e|r|u|ud|?
a : hh:mm:ss.nanosec 12:28:05.400184646
ad: a+ date 2019-03-10 12:29:15.000986266
フィルタ
-f “フィルタ”
host アドレス
tcp
udp
tcp port ポート
ブロードキャスト以外
not broadcast and not multicast
ARP,DNS以外
not arp and not port 53