*tcpdump [#u1cd7d28]
RIGHT:更新日&lastmod(); 

**tcpdump [#i05f1fc6]


 # tcpdump -vv host 192.xxx.xxx.xxx
 
 # tcpdump port 110
 
 # tcpdump -w (File名)

''type''

修飾子は id名または id 番号が指すものの種類を示す。利用可能なものは host, 
net, port である。例: `host foo'、`net 128.3'、`port 20'。 type 修飾子が
無い場合は、 host が指示されているものとみなす。

''dir''

修飾子は id に向けて、または id へ、のどちらかあるいは両方の通信方向を
特定する。方向として指示 できるのは src, dst, src or dst, src and dst 
である。例、 `src foo'、`dst net 128.3'、`src or dst port ftp-data'。 
dir 修飾子が指定されない場合は src or dst が指示されいているものとみなす。
`null' リン ク層(すなわち slip のよう なポイントツーポイントプロトコル)
においては、方向を指定する修飾子として inbound と outbound も利用可能である。

''proto''

修飾子は一致する特定のプロトコルに制限する。利用可能なプロトコルは以下
の通り: ether, fddi,  mopdl, ip, ip6, arp, rarp, decnet, lat, sca, moprc, 
mopdl, icmp, icmp6, tcp, udp。 例: `ether src foor'、`arp net 128.3'、
`tcp port 21'。 proto 修飾子が指示されない場合は type と矛盾しない範囲で全
てのプロトコ ルが指示されているものとみなす。 例: `src foo' は
 `(ip or arp or rarp) src foo' (このような 書き方は文法あやまりだが)を
`(ip or arp or rarp) src foo' (このような 書き方は文法あやまりだが)を
意味し、 `net bar' は `(ip or arp or rarp) net bar' を意味し、 また 
`port 53' は `(tcp or udp) port 53' を意味する。

not host vs and ace

は 

not host vs and host ace

の省略

tcpdump not host xxx.xxx.xxx.xxx and not host yyy.yyy.yyy.yyy

は、xxx.xxx.xxx.xxxとyyy.yyy.yyy.yyy以外を表示。


***tcpdumpの出力 [#n4e2d344]

 # /usr/sbin/tcpdump
 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
 listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
 11:17:21.133096 IP centos.abc.net.ssh > gw.xxxx.ac.jp.62994: P 1752593235:1752593431(196) ack 1272652948 win 63
 11:17:21.133455 IP centos.abc.net.32778 > ns.abc.net.domain:  56763+ PTR? xxx.xxx.xxx.192.in-addr.arpa. (45)
 

''[TCP]''
 src > dst: flags data-seqno ack window urgent options
 
 src        : 発信元ホスト.ポート
 dst        : 送信先ホスト.ポート
 flags      : S(SYN)、F(FIN)、P(PSH)、R(RST) の組み合わせか "."(なし)
 data-seqno : シーケンス空間
 ack        : 次に期待するシーケンス番号
 window     : 用意されているバッファのバイト数(ウィンドウサイズ)
 urgent     : 緊急フラグ
 options    : オプション

''[UDP]''
 src > dst: udp size
 
 src        : 発信元ホスト.ポート
 dst        : 送信先ホスト.ポート
 size       : データ部のサイズ(バイト)


**参考 [#ga235bfa]

http://www.linux.or.jp/JM/html/tcpdump/man1/tcpdump.1.html


--------------------------------------------------------------------------------
RIGHT:[[元ページ:http://wwwism.dyndns.org/hp/linux/tcpdump.htm]]



トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS