ASA、交换机、主机设备抓包

66 篇文章 0 订阅
8 篇文章 0 订阅
一、ASA的inside,outside接口抓包
1、打开syslog
logging on
logging timestamp
logging trap information
logging host inside X.X.X.X(日志服务器)
Clear conn
Clear xlate

2、配置要抓包的数据流
点对点抓包
access-list cap permit ip host X.X.X.X host X.X.X.X
access-list cap permit ip host X.X.X.X host X.X.X.X
capture asa_cap_inside type raw-data access-list tac_capture buffer 10000000 interface inside
capture asa_cap_outside type raw-data access-list tac_capture buffer 10000000 interface outside
全局抓包
access-list cap permit ip any any
capture asa_cap_inside type raw-data access-list tac_capture buffer 10000000 interface inside
capture asa_cap_outside type raw-data access-list tac_capture buffer 10000000 interface outside
3、查看相关信息
show clock
show conn address X.X.X.X
show local-host X.X.X.X
show asp drop
show xlate
show capture
d)拷贝capture到tftp服务器上
copy /pcap capture:asa_cap_inside tftp://X.X.X.X/asa_inside.cap
copy /pcap capture:asa_cap_outside tftp://X.X.X.X/asa_outside.cap

4、取消capture
no capture asa_capture_inside_1
no capture asa_capture_outside_1
clear capture asa_capture_inside_1
clear capture asa_capture_outside_1
no access-list cap permit ip host X.X.X.X host X.X.X.X
no access-list cap permit ip host X.X.X.X host X.X.X.X
no access-list cap permit ip host any any
二、交换机上抓包
1、交换机做span
configure terminal
monitor session 1 source interface fastethernet X/X/X
monitor session 1 destination interface fastethernet X/X/X
no monitor session X
show monitor

三、主机上抓包(linux)
tcpdump -s 0 -w /tmp/X.cap -i 网口 host X.X.X.X
tcpdump -nn -f host X.X.X.X and ! X.X.X.X
tcpdump -w test.cap -i 网口 tcp port 端口 or udp \( 端口 or 端口 \)

from:
http://blog.chinaunix.net/uid-14628842-id-2353656.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值