当前位置:网站首页>Tcpdump command usage details
Tcpdump command usage details
2022-07-01 22:57:00 【victorwjw】
tcpdump Command to use detailed _ Crazy little penguin blog -CSDN Blog _tcpdump Detailed command The most detailed tcpdump Use guide - Wang Yibai - Blog Garden Tcpdump Practical tutorial of bag capturing tool , Let you know that a bag grabs the world !_ Bili, Bili _bilibili
Generally, the following types of keywords :
About keywords for data types :
Include host、port、net, for example host 192.168.1.1 Indicates that this is a host ,net 192.168.0.0 It means this is a network address ,port 22 Indicates that the port number is 22, If no type is specified , The default type is host
Keywords of data transmission direction :
Include src、dst、dst or src、dst and src, These keywords indicate the direction of transmission , such as src 192.168.1.1 The source address of the packet is 192.168.1.1,dst net 192.168.0.0 Indicate that the destination network address is 192.168.0.0, The default is to monitor host to host src and dst, That is, by default, listen to all data of the local machine and the target host
Protocol keywords :
Include ip、arp、rarp、tcp、udp etc. ,
Other keywords :
Operation type :or、and、not、!
Auxiliary function :gateway、less、broadcast、greater
There is a complete method of use , The following excerpts are some commonly used
tcpdump -i eth0 Monitor the specified network card eth0 All transmission packets , When there are multiple network cards, you must specify which one
tcpdump host 192.168.56.209 and ( 192.168.56.210 or 192.168.56.211 ) # Capture host 192.168.56.209 And host 192.168.56.210 or 192.168.56.211 All communication packets ( It can also be a host name , But the requirements can be resolved IP Address )
tcpdump ip host node9 and ! www.baidu.com # Capture node9 Communication packets with all other hosts ( barring www.baidu.com)
tcpdump -i eth0 src node10 # Capture source host node10 All the process of sending eth0 All packets of the network card
-nn: Don't convert protocol and port number to name , It's going to be a lot faster .
tcpdump icmp -w icmp.pcap Use -w Is to write data to a file , While using -r Read data from file .
tcpdump -vvAls0 | grep 'POST' Grab HTTP POST Request package
tcpdump -nn -A -s1500 -l | egrep -i 'User-Agent:|Host:' from HTTP Extract... From the request header User-Agent And the host name
tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' Grab 80 Port of HTTP Valid packets , exclude TCP The packets of the connection establishment process (SYN / FIN / ACK)
tcp Protocol message header

Usually Wireshark( or tshark) Than tcpdump It's easier to analyze application layer protocols . The general practice is to use... On the remote server first tcpdump Grabbing data and writing it to a file , And then copy the file to the local workstation Wireshark analysis .
边栏推荐
- [untitled]
- ESP自动下载电路设计
- "Trust machine" empowers development
- 人体姿态估计的热图变成坐标点的两种方案
- Origin2018 installation tutorial "recommended collection"
- Vsphere+ and vsan+ are coming! VMware hybrid cloud focus: native, fast migration, mixed load
- Using emqx cloud to realize one machine one secret verification of IOT devices
- Use and function of spark analyze command map join broadcast join
- Operation category read is not supported in state standby
- Today's sleep quality record 71 points
猜你喜欢
![Happy number [fast and slow pointer of ring PROBLEMS]](/img/37/5c94b9b062a54067a50918f94e61ea.png)
Happy number [fast and slow pointer of ring PROBLEMS]

El input text field word limit, beyond which the display turns red and input is prohibited

Hide the creation and use of users

MySQL中对于事务的理解

MySQL5.7 设置密码策略(等保三级密码改造)

Today's sleep quality record 71 points

Daily question brushing record (10)

MySQL中对于索引的理解

Rust语言——小小白的入门学习05

Delete AWS bound credit card account
随机推荐
twenty million two hundred and twenty thousand seven hundred and one
Quantifiers of regular series
正则系列之组和范围(Groups and Ranges)
[QT widget] encapsulates a simple thread management class
Cutefishos system~
vSphere+、vSAN+来了!VMware 混合云聚焦:原生、快速迁移、混合负载
Wechat open platform scanning code login [easy to understand]
[untitled]
rxjs Observable of 操作符的单步调试分析
Arlo's thinking after confusion
Share some feelings of a programmer who has experienced layoffs twice a year
Kubernetes create service access pod
元宇宙可能成为互联网发展的新方向
Cloud Vulnerability Global Database
Selection of all-optical technology in the park - Part 2
2020-ViT ICLR
nn.Parameter】Pytorch特征融合自适应权重设置(可学习权重使用)
Lc669. Prune binary search tree
redis配置文件中常用配置详解[通俗易懂]
Appium automation test foundation - appium installation (I)