找回密码
 注册

QQ登录

只需一步,快速开始

网络抓包终结迅雷!绿盟教你如何抓包限制P2P软件

[复制链接]
发表于 2008-10-5 19:51:51 | 显示全部楼层 |阅读模式
<H2>网络抓包终结迅雷!绿盟教你如何抓包限制P2P软件</H2>" n+ I  G( x( R, ^
<DIV class=t_msgfont id=postmessage_70759><A href="http://www.ouyaoxiazai.com/article/16/241.html" target=_blank><FONT color=#0000ff>网络抓包终结迅雷!绿盟教你如何抓包限制P2P软件</FONT></A><BR><BR><FONT face="Verdana "><FONT color=#ff0000>迅雷是现在第1大下载工具,但是有些时候我们的网络带宽不是很多,内网又有不少人在使用迅雷下载东西,网速特别慢特别慢的.我们的小内网又没有可限制网速的路由器.下面介绍一种另类的限制P2P的方法!希望对大家有用!ACL限制!现在最普通的</FONT><A href="http://www.ouyaoxiazai.com/article/17/68.html" target=_blank><FONT color=#ff0000>华为M800路由器</FONT></A><FONT color=#ff0000>上都有这个功能的!</FONT></FONT><BR><FONT face="Verdana ">如今迅雷这种流氓软件不是简单的封端口就能完事的,还得从它的原理入手,找到破解之道.</FONT><BR><FONT face="Verdana ">1. 迅雷是什么<BR>============</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 迅雷是基于P2SP的一款下载软件,能够大大增强下载速度,可谓迅雷不及掩耳。</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; P2SP的道理不复杂,就是指:如果多个服务器上有某个相同的文件,当某个用户下载其中一个服务器上的这一文件时,迅雷会自动查找到另外的几个服务器,同时下载这一文件的不同部分,达到提速的目的。</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 也就是说,当你用迅雷下载一个文件的时候,迅雷不是直接去连接下载服务器,而是先连接它的资源服务器,在资源服务器中搜索你需要的这个文件,然后开始同时下载.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 根据这个原理,我们屏蔽掉发往迅雷资源服务器的数据包,应该就能封掉迅雷了.</FONT><BR><FONT face="Verdana ">2. 迅雷下载抓包<BR>===============</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 迅雷很流氓, 流氓得连资源服务器的IP地址都不让我们知道. 它不告诉我们, 我们只好自己动手了, 用嗅探器来分析迅雷下载时的数据包.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 首先下载安装wireshark这个嗅探工具<BR>&nbsp; &nbsp;&nbsp; &nbsp; <FONT color=#0938f7>http://transact.dl.sourceforge.net/sourceforge/wireshark/wireshark-setup-1.0.2.exe</FONT></FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 安装好后,启动wireshark,打开"Capture ---&gt; Interfaces",点击网卡后的"Options"按钮(如图1). <IMG alt="" src="http://www.ouyaoxiazai.com/article/UploadPic/2008-8/200882383142831.png" onload="attachimg(this, 'load')" border=0></FONT><BR><FONT face="Verdana ">点击"Capture Filter"按钮新建一个过滤器,使嗅探器只抓取从本地网卡上经过的数据包(如图2).</FONT><BR><IMG alt="" src="http://www.ouyaoxiazai.com/article/UploadPic/2008-8/200882383143657.png" onload="attachimg(this, 'load')" border=0><BR><FONT face="Verdana ">注:为减少分析抓取数据包时的干扰, 建议关闭所有程序.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 现在我们用迅雷下载wireshark那个连接, 同时启动wireshark抓包<BR>&nbsp; &nbsp; (打开"Capture ---&gt; Interfaces",点击网卡后的"Start"按钮).</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp;抓取一定数据包后,点击"Capture ---&gt; Stop"按钮停止抓包, 同时停止迅雷, 免得浪费带宽.</FONT><BR><FONT face="Verdana ">3. 数据包分析<BR>=============</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp;注:这里的数据是根据我抓取的数据包分析的,你的会有不同.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp;首先介绍一下我的网络设置, IP地址: 192.168.101.211, 网关: 192.168.101.1, DNS: 211.161.159.3.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 我们从抓取的第一个数据包开始(如图3).<BR><IMG alt="" src="http://www.ouyaoxiazai.com/article/UploadPic/2008-8/200882383144546.png" onload="attachimg(this, 'load')" border=0></FONT><BR><FONT face="Verdana ">No.1<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;源地址(Source)192.168.101.211<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;目的地址(Destination)211.161.159.3<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;协议(Protocol)DNS<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;信息(Info)Standard query A hub5sr.sandai.net</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 这是一个DNS查询数据包,但很奇怪,从 <FONT color=#0909f7>transact.dl.sourceforge.net</FONT> 下载文件应该先查询&nbsp; &nbsp;<BR>&nbsp; &nbsp; <FONT color=#0909f7>transact.dl.sourceforge.net</FONT>的地址啊,怎么会先查询hub5sr.sandai.net呢?</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 用浏览器上<A href="http://www.sandai.net/" target=_blank><FONT color=#0000ff>www.sandai.net</FONT></A>看看, 好家伙, 居然是迅雷在线的网站, 在百度里一搜, 发现sandai.net是迅雷旗下的网站,这个应该是迅雷的资源服务器之一了.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; No.2<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;源地址(Source)211.161.159.3<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;目的地址(Destination)192.168.101.211<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;协议(Protocol)DNS<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;信息(Info) Standard query response CNAME hub4t.sandai.net A 58.254.39.6</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 这是DNS服务器的回复数据包,说hub5sr.sandai.net是hub4t.sandai.net的一个别名,IP地址是58.254.39.6.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; No.3<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;源地址(Source)192.168.101.211<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;目的地址(Destination)211.161.159.3<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;协议(Protocol)DNS<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;信息(Info) Standard query A transact.dl.sourceforge.net</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 这又是一个DNS查询数据包,现在才开始查询transact.dl.sourceforge.net的地址.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; No.4 - No.7都是hub4t.sandai.net(58.254.39.6)和本机(192.168.101.211)的通信数据包, 看来迅雷的资源服务器反应还是蛮快的!<A href="http://www.ouyaoxiazai.com/" target=_blank><FONT color=#800080>www.ouyaoxiazai.com</FONT></A>出品!请保留版权信息!</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; No.9<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;源地址(Source)211.161.159.3<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;目的地址(Destination)192.168.101.211<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;协议(Procotol)DNS<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;信息(Info) Standard query response CNAME mirror01.transact.net.au A 202.55.147.10</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 这是DNS服务器的回复数据包, 说transact.dl.sourceforge.net是mirror01.transact.net.au的别名,IP地址是202.55.147.10.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 接下来的数据包和上面几个差不多,都是查询DNS,本机和资源服务器通信,文件下载数据包等.</FONT><BR><FONT face="Verdana ">4. 封杀迅雷<BR>============</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 我们只要在路由器上将迅雷发往资源服务器的数据包丢掉,迅雷就不能获取更多的下载地址,只能从transact.dl.sourceforge.net这一个地址下载了,迅雷的下载速度和占用的带宽自然就下降了.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 打开 HZZ Web 管理,点击"防火墙 ---&gt; 访问控制(ACL) ---&gt; 转发(Forward) ---&gt; 新建ACL规则",依次填入一下内容(如图4):<BR><IMG alt="" src="http://www.ouyaoxiazai.com/article/UploadPic/2008-8/200882383144659.png" onload="attachimg(this, 'load')" border=0></FONT><BR><FONT face="Verdana ">规则名: xunlei<BR>&nbsp; &nbsp; 目的IP地址: 58.254.39.6<BR>&nbsp; &nbsp; 匹配动作为丢弃<BR>&nbsp; &nbsp; 规则状态为激活</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 点击"提交修改"启用这条规则即可.</FONT><BR><FONT face="Verdana ">5. 备注</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 迅雷有很多资源服务器,可根据以上的方法将它们找出来,然后添加到路由器的ACL规则中.</FONT><BR><FONT face="Verdana ">&nbsp; &nbsp; 封杀前,迅雷的下载速度如图5.</FONT><BR><IMG alt="" src="http://www.ouyaoxiazai.com/article/UploadPic/2008-8/200882383144273.png" onload="attachimg(this, 'load')" border=0><BR><FONT face="Verdana ">封杀后,迅雷的下载速度如图6.</FONT><BR><FONT face="Verdana "><IMG alt="" src="http://www.ouyaoxiazai.com/article/UploadPic/2008-8/200882383144789.png" onload="attachimg(this, 'load')" border=0></FONT><BR><FONT face="Verdana "><FONT face="Verdana ">方法二、DNS 过滤</FONT><BR><FONT face="Verdana ">在DNS过滤中将sandai.net这整个泛域名过滤掉,过滤后迅雷下载时,将会出现域名解析失败,从而无法连接到它的资源服务器。</FONT><BR><FONT face="Verdana ">打开 HZZ Web 管理,点击"防火墙 ---&gt; DNS过滤",勾选"启用DNS过滤",</FONT><BR><FONT face="Verdana ">在"要过滤的域名关键字 (每条记录占一行, 如: badomain.com) "中</FONT><BR><FONT face="Verdana ">填入"sandai.net",保存设置即可.</FONT><BR><BR></FONT></DIV>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|本地广告联系: QQ:905790666 TEL:13176190456|Archiver|手机版|小黑屋|汶上信息港 ( 鲁ICP备19052200号-1 )

GMT+8, 2025-4-15 08:00

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表