2627|0

82

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

经验技巧:Juniper防火墙命令行查错工具(snoop) [复制链接]

Snoop 是Juniper防火墙另外一个有效的查错工具,它和debug flow basic的区别是: snoop类似于在防火墙的接口上抓包,可以根据具体接口, 数据包的方向, 协议等等要素进行过滤抓包; debug flow basic则对数据包如何穿越防火墙进行分析,将防火墙的对数据包的处理过程显示出来. Snoop的使用举例如下: 1. 先设置过滤列表,使得防火墙只对需要的数据包进行分析. 即snoop filter命令:   
ns208-> snoop filterdelete           delete snoop filter >
ethernet         snoop specified ethernet
id             snoop filter id |
ip             snoop ip packet ?YcG
off             turn off snoop filter dwjYU\on             turn on snoop filter
tcp             snoop tcp packet udp             snoop udp packet 7  

ns208-> snoop filter ip
direction         snoop direction
dst-ip           snoop filter dst ip dst-port         snoop filter dst port
interface         interface name
ip-proto         snoop filter ip proto a port           src or dst port Pv
src-ip           snoop filter src ip 1)TEIsrc-port         snoop filter src port
     IPv4 Address  
offset           ip offset UqDqF
ns208-> snoop info
Snoop: OFF
Filters Defined: 2, Active Filters 2
Detail: OFF, Detail Display length: 96 EE
Snoop filter based on: id 1(on): IP dir(I) qc
id 2(on): IP dst-ip 172.27.68.1 dir(B) :WdL
RHtx3{S/  
2. 开启snoop 进行抓包 YC
ns208-> snoopStart Snoop, type ESC or 'snoop off' to stop, continue? [y]/n y

3. 发送测试数据包或让小部分流量穿越防火墙
  
4. 停止snoop ns208-> snoop off

5. 检查防火墙对所转发的符合过滤条件的数据包的分析结果(非采用上面的filter,而是采用另外的filter): 
ns208-> get db stream 5Y=Mmu=JJ  
          1.    The packet comes into the Netscreen from the Trusted side client.             55864.0: 0(i):005004bb815f->0010db00ab30/0800  D*MoEd  
            10.0.0.36->10.10.10.14/1, tlen=60     vhl=45, id=31489, frag=0000, ttl=32
          2.    The packet then leaves the Netscreen, on it’s way to the destination host.       55864.0: 1(o):0010db00ab31->00104bf3d073/0800             10.10.10.10->10.10.10.14/1, tlen=60 uS
            vhl=45, id=31489, frag=0000, ttl=31 r
          3.    The packet then returns to the Netscreen from the host. &W          55864.0: 1(i):00104bf3d073->0010db00ab31/0800 |_+%'XtU  
              10.10.10.14->10.10.10.10/1, tlen=60 |yxLm              vhl=45, id=12289, frag=0000, ttl=128   

          4.    Finally, the packet is returned to the client on the trusted side. -

          55864.0: 0(o):0010db00ab30->005004bb815f/0800 4 /W|~=y            10.10.10.14->10.0.0.36/1, tlen=60 
            vhl=45, id=12289, frag=0000, ttl=127 6,19usXw:M  
6. 清除防火墙缓存的debug结果:ns208-> clear db W7. 清除防火墙的snoop过滤设置 z(usjTnV  
ns208-> snoop filter delete   
All filters removed



                   转自:杜松之家
点赞 关注

回复
举报
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/6 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表