tcpdump 用例
EXAMPLES
To print all packets arriving at or departing from sundown:
-
tcpdump host sundown
To print traffic between helios and either hot or ace:
-
tcpdump host helios and \( hot or ace \)
To print all IP packets between ace and any host except helios:
-
tcpdump ip host ace and not helios
To print all traffic between local hosts and hosts at Berkeley:
-
tcpdump net ucb-ether
To print all ftp traffic through internet gateway snup: (note that the expression is quoted to prevent the shell from (mis-)interpreting the parentheses):
-
tcpdump 'gateway snup and (port ftp or ftp-data)'
To print traffic neither sourced from nor destined for local hosts (if you gateway to one other net, this stuff should never make it onto your local net).
-
tcpdump ip and not net localnet
To print the start and end packets (the SYN and FIN packets) of each TCP conversation that involves a non-local host.
-
tcpdump 'tcp[tcpflags] & (tcp-syn|tcp-fin) != 0 and not src and dst net localnet'
To print all IPv4 HTTP packets to and from port 80, i.e. print only packets that contain data, not, for example, SYN and FIN packets and ACK-only packets. (IPv6 is left as an exercise for the reader.)
-
tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
To print IP packets longer than 576 bytes sent through gateway snup:
-
tcpdump 'gateway snup and ip[2:2] > 576'
To print IP broadcast or multicast packets that were not sent via Ethernet broadcast or multicast:
-
tcpdump 'ether[0] & 1 = 0 and ip[16] >= 224'
To print all ICMP packets that are not echo requests/replies (i.e., not ping packets):
-
tcpdump 'icmp[icmptype] != icmp-echo and icmp[icmptype] != icmp-echoreply'
相關文章
- 通過例項學習 tcpdump 命令TCP
- 用Tcpdump過濾資料包TCP
- Linux系統抓包命令tcpdump使用例項LinuxTCP
- tcpdumpTCP
- Linux基礎:用tcpdump抓包LinuxTCP
- linux/unix下用tcpdump抓包LinuxTCP
- tcpdump命令TCP
- tcpdump 命令TCP
- tcpdump使用TCP
- tcpdump歷史TCP
- Tcpdump使用示例TCP
- Tcpdump 的用法TCP
- Tcpdump和wiresharkTCP
- Tcpdump的使用TCP
- tcpdump基本用法TCP
- tcpdump抓包TCP
- 業務用例+概念用例+系統用例
- TcpDump使用手冊TCP
- tcpdump命令詳解TCP
- Linux - Tcpdump命令LinuxTCP
- tcpdump教程入門TCP
- 一份快速實用的 tcpdump 命令參考手冊TCP
- tcpdump命令常用引數TCP
- tcpdump命令簡單使用TCP
- [全程建模]用例、用例圖和用例模型的概念解析模型
- 【Linux】tcpdump命令詳解LinuxTCP
- linux下實現tcpdumpLinuxTCP
- tcpdump擷取MySQL報文TCPMySql
- tcpdump抓包分析詳解TCP
- 在lfs上安裝tcpdumpTCP
- Linux tcpdump 命令詳解LinuxTCP
- tcpdump抓包命令詳解TCP
- Tcpdump的小經驗(轉)TCP
- 【LINUX】一份快速實用的 tcpdump 命令參考手冊LinuxTCP
- UML用例圖例項解析
- tcpdump 命令的常用選項:一TCP
- tcpdump 命令的常用選項:二TCP
- tcpdump 命令的常用選項:三TCP