ユーザ用ツール

サイト用ツール


サイドバー

目次

ホーム










.

tools:packetcapture:tcpdump.html


ホーム#ツール

Linux tcpdumpコマンドでパケットキャプチャ

tcpdumpコマンド例

# tcpdump -i eth1   <-  eth0 is default interface.
# tcpdump -i any

# tcpdump -n  udp port 53 -i any  <- Check DNS
# tcpdump -n  port 53 -i any  <- Check DNS

# tcpdump -n  port 2049  -i any <- Check NFS

# tcpdump -n  not port 22
# tcpdump -n  not arp and not port 22
# tcpdump -n  not arp and not port 123 and not port 22
# tcpdump -n  not host 192.168.100.10

# tcpdump -D  # 利用できるNICの一覧




tcpdumpでパケットの中身を ASCII で表示

-A ASCII文字で表示を行う。

http通信の内容をキャプチャし表示

# tcpdump -s0 -A dst port 80

-s0 パケット数の制限をなくす


FTP通信の内容をキャプチャし表示

# tcpdump -s0 -A host 192.168.0.10 and \(port 20 or port 21\)


telnet通信の内容をキャプチャし表示

# tcpdump -s0 -A host 192.168.0.10 and port 23




tcpdumpの結果をWiresharkなどで分析するための取得方法

# tcpdump -s0 -A -n host 192.168.0.10 -w test.pcap
# tcpdump -s0 -A -n host 192.168.0.10 and \(port 80 or port 443 \) -w test.pcap

-wで保存したファイルを読み込む

# tcpdump -r test.cap  host 192.168.0.10





ホーム#ツール


tools/packetcapture/tcpdump.html.txt · 最終更新: 2021/05/22 01:23 by kurihara

ページ用ツール