首页 | 乐园 | 淘宝店 | 社区 | 电驴 | 网页游戏 | 网址大全

VeryCD / 社区 / 自由资源发布组 / 精华

资源管理小组

相关主题

主题: [转贴]ipfilter介绍

相关分类: eMule技术心得 资料库

elvis_w (组长) 2008/09/29 21:34:27 顶楼 举报

转自http://board.VeryCD.com/t477917.html
IPfilter和DLP

IPfilter就是IP地址过滤,这里介绍的ipfilter是用于P2P软件,包括emule、BT等等。简单的说就是通过这个过滤内容和过滤等级的限制,使我们的P2P软件不去连接这些IP地址,这些IP地址也无法连接我们的P2P软件。但是不会阻止你的电脑和这些IP间的联系,想要杜绝电脑的联系,你必须使用防火墙/XP系统的“IP安全策略”/路由器等等手段封掉这些IP。

这里可能存在一个误区,准确的说ipfilter不是专门用来杀吸血客户端的,而是针对各种反P2P行为,包括虚假、间谍服务器,vagga服务器,恶意IP,带有木马、间谍软件的攻击性IP、黑客等等不安全的IP地址,毕竟单从IP地址来判断是否是吸血用户是很难的。当然,要是吸血客户端恰好在我们的过滤IP段中就会被封掉。

而封杀吸血用户(各种吸血mod)用的是DLP(Dynamic Leecher Protection),一个eMule的插件。请不要混淆二者,以为用了ipfilter就等于防吸血万事大吉了。

关于DLP的帖子推荐大家去这里:
http://bbs.VeryCD.com/topics/473571/


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

过滤等级(filter/access level)

过滤等级是ipfilter的一个范围限定值,他限定的是哪些连接方式(连接方式这个名称并不准确,但是我不知道怎么描述比较好,大家姑且这么理解)被禁止。我们看看这段说明:

感谢11楼的AUG兄提供的连接方式的中文译名

代码
#>> You can adjust the level of IPFilter.dat in eMule (default: all numbers before 127 are filtered)
# 60 = [BG] = Unallocated Address Space on IPv4. 还未分配的IPV4地址段
# 70 = [BG] = Bogus AS Advertisements. 伪造的广告发送地址
# 80 = [BG] = Possible Bogus Routes. 很可能是伪造的路由器地址
# 90 = [L1] = Level1.
# 95 = [FK] = Fake Server. 虚假的服务器
# 97 = [MS] = Microsoft. 微软
# 99 = [HJ] = Hijacked. 被劫持的地址
# 109 = [L2] = Level2.
# 111 = [SW] = Spyware. 间谍软件
# 113 = [AD] = Ad Trackers. 广告软件节点
# 115 = [SD] = Spider. 蜘蛛(一般是搜索引擎的)
# 117 = [TJ] = Trojan. 特洛伊(木马)
# 119 = [TL] = TempList. 临时列表
# 160 = [LN] = Lan range. 局域网保留IP段
# Example: if you wants filtered all except L2 & SW & AD & SD & TL & LN, you must set 108.
# -------- if you wants filtered only Bogon, you must set 65.
# more you decreases level in eMule, more the security of IPFilter decreases.


上面的每一个数字代表了相对应的连接方式的“门槛”。在我们设定的过滤等级以下的数字所代表的连接方式将被封禁,而以上的数字将被放行。我们举个例子:


引用
064.094.089.000 - 064.094.089.255 , 100 , Gator.com
066.035.250.203 - 066.035.250.203 , 200 , SourceForge.net
013.020.222.112 - 013.020.222.112 , 230 , Somethingawful.com


假设我们的过滤等级是默认的127,这个时候Gator.com被封了,另外两个被放行了。如果我们设为210,那么只有Somethingawful.com被放行,另外两个都被封了。简单的说,过滤等级数越低,ipfilter放行的IP地址就越多,安全性能就越低,反过来过滤等级越高,封禁的就越多,安全性提高,当然误伤的也就更多。

上面这个例子中的ipfilter是以前的格式,每一行的IP段都有一个对应的过滤等级,但是实际上现在的格式中已经没有了,取而代之的是在后面标注连接方式。如:


引用
170.150.000.000 - 170.150.255.255 , 000 , Bogon


这里的Bogon对应的过滤等级是60--“还未分配的IPV4地址段”,大家可以用记事本打开自己的ipfilter查看。
因为每一种连接方式对应一个级数,过滤等级就是这样辅助限定ipfilter起作用的范围,所以eMule默认的127是很有道理的----除了“局域网保留IP段”之外的IP连接方式全部封杀。

11-05:这里要补充一下来自28楼jason_jiang的关于过滤等级的意见,我想这解释了为什么在实际使用中过滤等级控制效果不明显的现象,非常感谢jason_jiang。

引用
关于Level1和nipfilter,我也来说两句。

eMule默认过滤等级是127,我们对照AUG的过滤等级表和楼主的解释来看看nipfilter比Level1多出什么:
引用
# 109 = [L2] = Level2.
# 111 = [SW] = Spyware. 间谍软件
# 113 = [AD] = Ad Trackers. 广告软件节点
# 115 = [SD] = Spider. 蜘蛛(一般是搜索引擎的)
# 117 = [TJ] = Trojan. 特洛伊(木马)
# 119 = [TL] = TempList. 临时列表

可以看出,设为我一直推荐的108以后,上述区间是不过滤的。而根据以往的经验,误伤主要发生在# 109 = [L2] = Level2这个区间!

而这些区间:
引用
# 111 = [SW] = Spyware. 间谍软件
# 113 = [AD] = Ad Trackers. 广告软件节点
# 115 = [SD] = Spider. 蜘蛛(一般是搜索引擎的)
# 117 = [TJ] = Trojan. 特洛伊(木马)
# 119 = [TL] = TempList. 临时列表

eMule是个P2P工具,不是防火墙,对于上述区间,eMule根本不能拦截(那些IP用系统漏洞之类的手段扫描你,eMule能拦截吗?)在eMule里载入nipfilter只会让eMule运行速度变慢、内存占用变大而已。所以我个人认为,eMule用主要针对P2P的level1就够了。如果你用的是level1,那么无论过滤等级是127还是108,效果都是一样的。127与108的差异主要在nipfilter上体现出来。

但是,我记得Outpost防火墙有个插件(具体情况忘了),可以载入IPfilter作为辅助防护。如果你能找到这个东西,就用它载入nipfilter,而eMule不用任何IPfilter。这样可以把单纯的P2P防护,升级为整个系统的防护。


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

不同版本的IPfilter

IPfilter出现时间很久了,网上也曾经出现各种各样的版本,也有许多专门的网站持续更新改善。不过经过了这些年之后还存在的比较大的就是这三个:
PeerGuardian
B.I.S.S(Bluetack Internet Security Solutions)
Pawcio

我一个一个介绍:
.............................................................................................................................................................

PeerGuardian

曾经风靡一时的PeerGuardian,早期算是独立软件形式的P2P防护优化中做得比较好的一个。用的是自己专门的blocklist更新网站。然而05年的叛变事件(听闻...)对其打击很大。06年推出的PG2后开发几乎就停滞了,官网最新一次放出的消息是在今年7月,内容是“blocklist更新网站倒了,但是不影响更新服务”.....而且PG一直对中国IP打压严重,这里就一笔带过了....

.............................................................................................................................................................

B.I.S.S(tack Internet Security Solutions)

英国民间网络安全组织Bluetack,一直都很专业做得很好,eMule官网的ipfilter Q&A也指向他们。Bluetack提供了3个主要的ipfilter和13个blocklist,还有他们自己开发的一系列P2P防护软件。这里主要介绍三个ipfilter:

Level1

bluetack简版ipfliter,主要针对的是各种反P2P机构,包括虚假服务器,间谍服务器等等。我记得以前大概是4万多条规则,最近没有用过不知道长了多少。jason_jiang的帖子 [原创]封杀吸血驴终极大法(10月24日更新)中推荐的就是这个。因为仅针对恶意服务器IP,对个人用户的误伤很小,但是安全性相应有些不足,所以jason_jiang在帖子里建议大家手动添加若干个恶意IP地址,提高防护效果(注:这几个IP地址以下的几个版本的ipfilter都包含了)。

下载/添加地址:

代码
http://www.bluetack.co.uk/config/level1.gz


内容说明:

引用
Level1 List
This list blocks known anti-p2p companies.
It contains p2p trackers like Mediasentry, Mediaforce, and known fake p2p file sources from companies like Overpeer. The list also contains all known Government - Military - Science - Research Labs and Bad Education facilities IP addresses collected by the Bluetack Team. Basically this list will block all kinds of internet connections that most people would rather not have during their internet travels.


nipfilter(Normal IP Filter)

这实际是一个多blocklist集合包的普通版本,从下面的说明大家可以看到它是包括了Level1的。nipfilter的打击力度远高于Level1,自然误伤也会增加。我刚才加载了一次,一共是199789条IP过滤规则。加载后服务器在80个左右,平均ban的用户数目占请求总数的1/6~1/4。我使用这个很长时间了,发布资源、下载都很正常,没有出现过问题。(我使用的VC的Mod v0.48a,加上最新的IP数据库和DLP。)

下载/添加地址:

代码
http://www.bluetack.co.uk/config/nipfilter.dat.gz


内容说明:

引用
EMULE nip filter.dat
This blocklist is the (normal) IP Filter.dat.gz (Gzipped) for loading into Emule.
NOTE: gzip is not supported in Emule Plus

The nipfilter.dat file includes the following ranges pre-merged into it:

* Level1
* Bogon list
* Hijacked IP blocks
* IANA Multicast
* IANA Private
* IANA Reserved
* Level2
* Microsoft
* NonLan list
* templist.txt


pipfilter(Paranoid IP Filter)

Paranoid意思是神经质的、偏执的,从说明可以看到这其实就是Bluetack所有blocklist的集合,我没有使用过,估计有好几十万条规则.....明显的宁可错杀一百也不放过一个。因为打击范围过广不推荐使用。


引用
来自10楼uralhan的声音:
“我推荐使用Paranoid IP Filter,宁可误杀一千,不可放过一个,更何况其实没有那么多的误伤。keep p2p clean。”

因为我个人一直很赞同uralhan,他的许多观点不但正确而且精确,所以这里特意帮他传话^^

下载/添加地址:

代码
http://www.bluetack.co.uk/config/pipfilter.dat.gz


内容说明:

引用
EMULE (paranoid) pip filter.dat
This blocklist is the (Paranoid) IP Filter.dat (gzipped)for loading into Emule.
NOTE: gzip is not supported in Emule Plus

The pipfilter.dat file includes the following ranges pre-merged into it: All lists except the master exclusions list - only use if you know what you are doing. (gzipped)

* Ad Trackers
* Bogon Ranges
* DShield Recommended
* Educational Ranges
* Hijacked IP blocks
* IANA Multicast
* IANA Private
* IANA Reserved
* Level1
* Level2
* Microsoft Related
* Non-LAN list
* Spiders list
* Spyware list
* Trojans & Portscanners
* Level3
* Rangetest list
* templist


.............................................................................................................................................................

Pawcio

Pawcio是著名eMule站(http://www.emule-mods.de)放出的ipfilter最新的版本是v126。AUG的帖子[下载]最新EMULE IP数据库与IPFILTER/DLP中推荐的就是这个。
Pawcio也是国外各种mod用得比较多的一版ipfilter,他是由B.I.S.S的nipfilter、一些其他的blocklist、一些防护软件中的list,加上他自己的一些IP整合而成的。我们看看v126的版本说明:


CODE
Ipfilter v126 (2007-10-01)
#
#-0---(main title)---Ipfilter v126 (2007-10-01).
#>> Builded to be used with eMule & a private ISP. Fight the Futur.
#
#-1---(3 lists)------BOGON list (2007-09-29).
#>> [BG]FreeSP: Unallocated (Free) Address Space
#>> [BG]AS-12345: Bogus AS Advertisements (Source: IANA AS Registry)
#>> [BG]Routes-ABCDEF: Possible Bogus Routes
#
#-2---(8 lists)------Bluetack (BISS) Personal-Build of IPFilter (2007-09-29).
#>> Includes: Level1[L1], Level2[L2], Microsoft[MS], Spider[SD], Spyware[SW],
# TempList[TL]and Ad Trackers[AD].
#>> Many corrections (~75 lines) on cosmetic input...all lines readables are includes.
#
#-3---(1 list)-------Fakes Server List from eMule-Project (2007-09-22).
#>> Fake server list[FK] updated by ElChele from the users feedbacks in eMule-Project Forum.
#
#-4---(main tool)----Merged by BlockList Manager 2.7.7 (2007-05-28).
#>> all the lists are imported manually (not by BLM) one by one in (a.a.a.a,b.b.b.b,000,c) format.
#>> IPFilter v126: Deny IP Count: 2 667 964 089 (62,1% of IPv4).
#>> IPFilter v125: Deny IP Count: 2 710 748 450 (63,1% of IPv4).
#>> IPFilter v124: Deny IP Count: 2 711 960 561 (63,1% of IPv4).
#>> IPFilter v123: Deny IP Count: 2 725 246 825 (63,5% of IPv4).
#>> IPFilter v122: Deny IP Count: 2 726 977 415 (63,5% of IPv4).
#>> IPFilter v121: Deny IP Count: 2 735 661 245 (63,7% of IPv4).
#>> IPFilter v120: Deny IP Count: 2 745 158 721 (63,9% of IPv4).
#>> IPFilter v119: Deny IP Count: 2 758 225 808 (64,2% of IPv4).
#>> IPFilter v118: Deny IP Count: 2 766 288 713 (64,4% of IPv4).
#>> IPFilter v117: Deny IP Count: 2 778 646 429 (64,7% of IPv4).
#>> IPFilter v116: Deny IP Count: 2 785 130 442 (64,8% of IPv4).
#>> Please, feedback to emule-project or Bluetack forum (links are on top, section -0-, -2- and -3-).
#
#-5---(warning !)----If you uses this ipfilter, you will know this:
#>> 10.0.0.0-10.255.255.255, 127.0.0.0-127.255.255.255,
# 172.16.0.0-172.31.255.255 and 192.168.0.0-192.168.255.255 are (not by eMule) filtered.
# It's the LanCast[LN] feature of eMule and it have the level 160. Be careful without eMule.
#>> "MultiCast" ranges are filtered.
#>> "Test Port" is filtered. It's a feature of eMule.
#>> Somes ED2K servers will be filtered when you update the ED2K server list.
#>> This IPFilter would be not used with a firewall...some many web site will be filtered.
#>> You can adjust the level of IPFilter.dat in eMule (default: all numbers before 127 are filtered)
# 60 = [BG] = Unallocated Address Space on IPv4.
# 70 = [BG] = Bogus AS Advertisements.
# 80 = [BG] = Possible Bogus Routes.
# 90 = [L1] = Level1.
# 95 = [FK] = Fake Server.
# 97 = [MS] = Microsoft.
# 109 = [L2] = Level2.
# 111 = [SW] = Spyware.
# 113 = [AD] = Ad Trackers.
# 115 = [SD] = Spider.
# 119 = [TL] = TempList.
# 160 = [LN] = Lan range.
# Example: if you wants filtered all except L2 & SW & AD & SD & TL & LN, you must set 108.
# -------- if you wants filtered only Bogon, you must set 65.
# more you decreases level in eMule, more the security of IPFilter decreases.
#
#-6---(Add & Remove)-Changes from the original lists or Features added.
#>> 2006-02-04: single range 038.117 -> 038.119 removed (many others ranges are more detailed in this range).
#>> 2006-02-24: Idea by Mc4TuTi - Add of the [BG], [L1], etcs... to show witch list are used immediatly.
#>> 2006-02-24: Idea by leuk_he - Add of the propers levels to customize the level of the filter.
#>> 2006-04-23: Idea by the users - Add of a Fake server list.
#>> 2006-06-26: Idea by bscabral - reduce the length of descriptions to 4 (normalized) or 20 (free) units.
#>> 2006-08-26: Add of more lists: Spider[SD], Spyware[SW], TempList[TL] and levels modified.
#>> 2007-01-07: Add of more lists: Trojan[TJ], Ad Trackers[AD] and levels modified.
#>> 2007-09-19: Remove of completewhois sources: domain hijacked (Hijacked list of BISS removed, too).
#>> 2007-09-26: Idea by Andrey23 - Add of new lists for Bogon ranges: CIDR-Report and levels modified.
#>> 2007-09-28: Remove of Trojan[TJ]: List not updated since more than 1 year.


我们可以看出Pawcio和B.I.S.S的pipfilter应该是一个等级的,封禁范围比较全面,安全等极高,但是对国内IP的误伤也比较大。

下载地址:

代码
http://www.emule-mods.de/?mods=ipfilter

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

如何使用IPfilter

有些mod本身自带ipfilter更新功能,而对于VC的mod,最简单的方法就是在eMule中添加更新地址。将上述ipfilter介绍中的“添加地址”复制到eMule的“选项---安全---IP过滤---从此URL更新”,按“加载”即可完成更新,完成后会在日志中显示“2007-11-2 1:35:08: 已加载199789条IP过滤规则”的字样。这个过程不需要关闭eMule。

如果你无法通过添加的方法更新ipfilter,那么你可以下载到你的硬盘,解压后重命名为“ipfilter.dat”,放置到“\eMule\config\”文件夹下覆盖原文件即可。此过程最好先关闭eMule。

你可以用写字板/记事本打开你的ipfilter.dat文件,查看其中的具体内容。

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

长篇大论了一堆,如果你坚持看完了我要表示一下佩服.....
至于如何选择ipfilter,这个完全要根据大家自己的情况,譬如是否有其他的安全防护措施,是否喜欢下冷门资源(显然,冷门本来源就少,再ban掉几个就没了...)等等。不管怎样目前要封杀吸血防各种反P2P机构,误伤是在所难免的,如果投鼠忌器反而会助长吸血和反P2P组织的势头,更不利于P2P的长远发展,所以使用ipfilter是绝对有必要的。

分享到开心网  分享到校内  收藏到QQ书签    订阅本主題RSS更新  美味书签

apple51320 2008/09/29 21:47:56 2楼 举报


组长辛苦了


[0] [0] [回复]

wuyong1119 2008/09/30 01:45:14 3楼 举报

组长辛苦哈,能不能给我一个远景论坛的邀请码。我的邮箱是wuyong519@126.com.谢谢


[0] [0] [回复]

4楼已被删除

elvis_w (组长) 2008/09/30 09:13:57 5楼 举报

远景的邀请码,我也没有啊


[0] [0] [回复]

elvis_w (组长) 2008/10/05 20:55:51 6楼 举报

下线看书去,阿门


[0] [0] [回复]

pm3l 2008/10/15 03:33:57 7楼 举报

cn里tool文件夹有个升级工具个人感觉还不错


[0] [0] [回复]

elvis_w (组长) 2008/10/17 16:59:43 8楼 举报

IP数据库扩展,另一个是官版的工具


[0] [0] [回复]

elvis_w (组长) 2008/11/04 15:58:39 9楼 举报

下线看书去,阿门


[0] [0] [回复]

elvis_w (组长) 2008/11/08 20:39:55 10楼 举报

下线看书去,阿门


[0] [0] [回复]

pm3l 2008/11/16 19:36:02 11楼 举报

把以色列大部分IP段加进去了!

他们花样太多,真受不了了.................


[0] [0] [回复]

elvis_w (组长) 2008/11/16 19:52:22 12楼 举报

犹太骡对我影响不大


[0] [0] [回复]

yxc2107 2008/12/16 13:22:21 13楼 举报

非常好,支持一下!!


[0] [0] [回复]

油温图斯 2008/12/26 17:53:37 14楼 举报

支持一下


[0] [0] [回复]

2009圆蛋 2009/01/01 20:04:22 15楼 举报

来这里转转,不错,好东西,白光盘也可来这里发了!!


[0] [0] [回复]

complexmind 2009/01/24 20:14:55 16楼 举报

好好学习了一下,发现真是好东西!受益匪浅啊,谢谢楼主!


[0] [0] [回复]

変態天狗 2009/01/29 10:44:24 17楼 举报

level1就ban掉了70多服务器,好强


[0] [0] [回复]

cnbird1999 2009/01/29 12:56:45 18楼 举报

是linux的吗?


[0] [0] [回复]

19楼已被删除

over123456 (斑竹) 2009/01/29 22:17:40 20楼 举报

chengr28 终于出现了~


[0] [0] [回复]

21楼已被删除

over123456 (斑竹) 2009/01/29 22:30:50 22楼 举报

..................新手飘过 IPB Image


[0] [0] [回复]

wangjue519 2009/02/10 14:08:16 23楼 举报

路过......
我也不能说什么了......


[0] [0] [回复]

ph421653285 2009/04/02 18:34:29 24楼 举报

好深奥


[0] [0] [回复]

足迹李 2009/10/29 22:59:40 25楼 举报

我哎你


[+1] [0] [回复]


返回组首页

快速回复

(?) 附件上传

关于我们 | 诚聘英才 | 著作权声明 | 合作信息 | 广告事务
沪ICP备05001009号
©2003 - 2009 VeryCD.com Some Rights Reserved.