tcpdump抓包规则命令大全
下面的例子全是以抓取eth0接口为例,如果不加”-i eth0”是表示抓取所有的接口包括lo。
1、抓取包含10.10.10.122的数据包
# tcpdump -i eth0 -vnn host 10.10.10.122
2、抓取包含10.10.10.0/24网段的数据包
# tcpdump -i eth0 -vnn net 10.10.10.0/24
3、抓取包含端口22的数据包
# tcpdump -i eth0 -vnn port 22
4、抓取udp协议的数据包
# tcpdump -i eth0 -vnn udp
5、抓取icmp协议的数据包
# tcpdump -i eth0 -vnn icmp
# tcpdump -i eth0 -vnn arp
7、抓取ip协议的数据包
# tcpdump -i eth0 -vnn ip
8、抓取源ip是10.10.10.122数据包。
# tcpdump -i eth0 -vnn src host 10.10.10.122
9、抓取目的ip是10.10.10.122数据包
# tcpdump -i eth0 -vnn dst host 10.10.10.122
10、抓取源端口是22的数据包
# tcpdump -i eth0 -vnn src port 22
11、抓取源ip是10.10.10.253且目的ip是22的数据包
# tcpdump -i eth0 -vnn src host 10.10.10.253 and dst port 22
12、抓取源ip是10.10.10.122或者包含端口是22的数据包
# tcpdump -i eth0 -vnn src host 10.10.10.122 or port 22
13、抓取源ip是10.10.10.122且端口不是22的数据包
[root@ ftp]# tcpdump -i eth0 -vnn src host 10.10.10.122 and not port 22
# tcpdump -i eth0 -vnn \( src host 10.10.10.2 and dst port 22 \) or \( src host 10.10.10.65 and dst port 80 \)
[root@localhost ~]# tcpdump -i eth0 -vnn 'src host 10.10.10.59 and dst port 22' or ' src host 10.10.10.68 and dst port 80 '
# tcpdump –i eth0 -vnn -w /tmp/fil1 -c 100
# tcpdump –i eth0 -vnn -r /tmp/fil1 tcp
# tcpdump –i eth0 -vnn -r /tmp/fil1 host 10.10.10.58
tcpdump抓包规则命令大全的更多相关文章
- tcpdump抓包常用命令列举
情形一.采集指定网络接口和端口的数据包 sudo tcpdump -s 0 -x -n -tttt -i bond0 port 55944 -w /tmp/mysql_tmp.tcp 情形二.采集 ...
- 【问题定位】tcpdump 抓包简易命令
tcpdump -A -i lo port 2003 or port 2103 or port 2203 | grep '.*system.*'
- tcpdump抓包命令
本文转自 : http://www.cnblogs.com/ggjucheng/archive/2012/01/14/2322659.html http://www.itshouce.com.cn/l ...
- TCPdump抓包命令详解--摘
http://blog.csdn.net/s_k_yliu/article/details/6665673/ http://starsliao.blog.163.com/blog/static/890 ...
- TCPdump抓包命令详解
http://starsliao.blog.163.com/blog/static/89048201062333032563/ TCPdump抓包命令 tcpdump是一个用于截取网络分组,并输出分组 ...
- 抓包工具:tcpdump抓包命令详解
抓包工具:tcpdump抓包命令详解 简介: tcpdump全称:dump the traffic on a network,根据使用者的定义对网络上的数据包进行截获的包分析工具. tcpdump可以 ...
- Wireshark和TcpDump抓包分析心得
Wireshark和 TcpDump抓包分析心得 1. Wireshark与tcpdump介绍 Wireshark是一个网络协议检测工具,支持Windows平台和Unix平台,我一般只在Window ...
- 转 Wireshark和TcpDump抓包分析心得
1. Wireshark与tcpdump介绍 Wireshark是一个网络协议检测工具,支持Windows平台和Unix平台,我一般只在Windows平台下使用Wireshark,如果是Linux的话 ...
- tcpdump 抓包
简介 用简单的话来定义tcpdump,就是:dump the traffic on a network,根据使用者的定义对网络上的数据包进行截获的包分析工具. tcpdump可以将网络中传送的数据包的 ...
随机推荐
- 转载——PLSQL developer 连接不上64位Oracle 解决办法
前两天刚下载了oracle 11g 64位的最新版本,安装成功之后,再安装PLSQL.结果使用PLSQL访问数据库时,死活连接不上.报错如下: Could not load "……\bin\ ...
- Nginx介绍
原文:http://www.aosabook.org/en/nginx.html 作者: Andrew Alexeev nginx(发音"engine x")是俄罗斯软件工程师Ig ...
- java之RTTI和反射的理解
最近在读 Thinking in Java 这本书.读到类型信息这一张时,刚开始对书中所说的RTTI和反射彻底混了,不知道有什么联系,有哪些相同点和区别.于是在网上又找了些内容辅助理解,这一章又重新读 ...
- 织梦dedecms分类信息模型上一页下一页失效办法
修改文件/include/arc.archives.class 将一下代码 $next = (is_array($nextR) ? " where arc.id={$nextR['id']} ...
- C++-标准输入输出
1,cout 1) 用来向标准输出打印. 2) 如果参数是char*类型,则直接输出字符串.如果想要输出地址,则需要强制转换: <<static_cast<void*>(con ...
- WP8 独立存储 总结3(应用设置)
•可在独立存储中使用ApplicationSettings对象•在独立存储中存储键/值对的Dictionary方式存储 •存储的对象将永久保存 在应用设置中保存数据 void saveString(s ...
- C语言基础--while循环
while循环格式: while (条件表达式) { 语句; ... } 执行说明: while是对给定的条件进行判断, 如果条件满足, 就执行while后面大括号中的内容, 执行完毕之后会再次判 ...
- hdu 1031 (partial sort problem, nth_element, stable_partition, lambda expression) 分类: hdoj 2015-06-15 17:47 26人阅读 评论(0) 收藏
partial sort. first use std::nth_element to find pivot, then use std::stable_partition with the pivo ...
- 这个setDefaultCloseOperation写不写的区别是什么?
2009-03-23 13:40提问者采纳 设置用户在此窗体上发起 "close" 时默认执行的操作.必须指定以下选项之一: DO_NOTHING_ON_CLOSE(在 W ...
- C语言中动态分配数组
如何动态的定义及使用数组呢?记得一般用数组的时候都是先指定大小的.当时问老师,老师说是不可以的.后来又问了一位教C++的老师,他告诉我在C++里用new可以做到,一直不用C++,所以也不明白.今天在逛 ...