1.解压缩.tar.gz文件后,进入源码目录。
2.修改Makefile文件,主要是其中的KERNEL_SRC和IPTABLES_SRC,使他们指向具体的内核源代码目录和iptables的源代码目录。(内核必须要设置正确,因为通常编译的内核都不会打开“Module versioning support”选项;但是iptables的目录不是必须的,只要iptables.h文件在系统的include目录(通常是/usr/include)中就可以)
3.如果提示编译libipt_ipp2p.so有错误,请将Makefile中的“$(CC) -shared -o libipt_ipp2p.so libipt_ipp2p.o”修改为“ld -shared -o libipt_ipp2p.so libipt_ipp2p.o”。(1.3.5版的iptables使用ld没问题;但是1.3.8版的使用ld就不行了,只能使用gcc)
4.将编译好的libipt_ipp2p.so复制到iptables的模块目录下(通常为/lib/iptables);将ipt_ipp2p.ko复制到内核的netfilter目录下(通常为/lib/modules/内核名称/kernel/net/ipv4/netfilter)
5.运行depmod -a,更新内核模块的依赖关系。
6.停止iptables服务,rmmod ipt_ipp2p,启动iptables服务。
19.42 KB, 下载次数: 1143
19.25 KB, 下载次数: 2146
19.49 KB, 下载次数: 406
19.5 KB, 下载次数: 349
19.58 KB, 下载次数: 344
19.59 KB, 下载次数: 424
19.1 KB, 下载次数: 342
19.11 KB, 下载次数: 338
19.11 KB, 下载次数: 2058
19.33 KB, 下载次数: 386
19.63 KB, 下载次数: 445
19.73 KB, 下载次数: 659
19.85 KB, 下载次数: 557
19.78 KB, 下载次数: 1672
7.57 KB, 下载次数: 715
20.32 KB, 下载次数: 3371
xunlei.JPG (26.46 KB, 下载次数: 318)
xunlei.JPG (24.82 KB, 下载次数: 262)
原帖由 ShadowStar 于 2007-11-18 03:50 发表
你的iptables中同时存在0.99.4的和0.99.5的两个版本?
建议你先暂停iptables,然后rmmod ipt_ipp2p模块,再启动iptables。
这样确保系统加载的是新的0.99.5的模块,可以通过tail /var/log/message看到。
...
xunlei.jpg (52.26 KB, 下载次数: 123)
原帖由 5639863 于 2007-11-18 21:21 发表
看这个图片,没有出现你说的那个搜索候选资源失败的提示
[root@proxy5 ~]# iptables -vnL FORWARD
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out so ...
原帖由 luojm_24680 于 2007-11-19 22:01 发表
iptables是iptables1.3.8,源码在/usr/src/iptables-1.3.8目录下
kernel源码在/usr/src/linux-2.6.19
原帖由 5639863 于 2007-11-19 22:08 发表
-A INPUT -m ipp2p --xunlei -j DROP
-A INPUT -i eth0 -j eth0_in
-A INPUT -i eth1 -j eth1_in
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -j Drop ...
原帖由 platinum 于 2007-11-20 08:22 发表
迅雷虽然走 TCP/80,但其不具有 HTTP 头,所以不应被 squid 处理
但由于 iptables 针对 TCP/80 做了透明代理,使 TCP/80 产生了跳转,而 squid 又不会对 TCP/80 做处理,因此这种情况下迅雷是不会工作在 TCP/8 ...
13.83 KB, 下载次数: 164
原帖由 ShadowStar 于 2007-11-20 12:36 发表
迅雷查询候选资源的数据包具有HTTP头,是POST Method的。
如果没有HTTP包头,SQUID不做处理的话,5639863那边就不会成功获得XX个候选资源了。
具体的数据包,白金兄可以看一下附件。
原帖由 ShadowStar 于 2007-11-19 15:11 发表
我大概猜到为什么你那边还是能搜索到候选资源了。
1。你的透明代理是将发送到80端口的数据包转发到本地的SQUID代理服务器,然后再由SQUID代理发送到对方服务器。
2。迅雷搜索候选资源使用的http协议、80端 ...
原帖由 ShadowStar 于 2007-11-21 15:06 发表
单点下载的话,就和IE的“另存为”没什么区别了,速度快只能说明与对方网站的连接速度快。
如果让这个连不上的话,只能是阻止所有的HTTP下载了。
0.99.6版在1楼
原帖由 ShadowStar 于 2007-11-16 20:42 发表
主要是由于那个aeon_coming发的帖子太长了,大家看起来麻烦,所以重发一帖。
0.99.6版
ChangeLog
增加对于QQ超级旋风的过滤,添加在--xunlei选项中。(使用--xunlei选项同时针对迅雷和QQ超级旋风)
0 ...
#iptables -m ipp2p --help |
原帖由 springwind426 于 2007-11-23 09:00 发表
gcc --version
gcc (GCC) 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is N ...
原帖由 springwind426 于 2007-11-23 09:00 发表
gcc --version
gcc (GCC) 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is N ...
原帖由 yanzai 于 2007-11-24 15:11 发表
iptables -A FORWARD -p tcp -m ipp2p --xunlei -j DROP
iptables: No chain/target/match by that name
晕,怎么iptables会报这样的呢?
原帖由 yanzai 于 2007-11-24 15:11 发表
iptables -A FORWARD -p tcp -m ipp2p --xunlei -j DROP
iptables: No chain/target/match by that name
晕,怎么iptables会报这样的呢?
原帖由 springwind426 于 2007-11-25 12:03 发表
修改Makefile
KERNEL_SRC = ../linux-2.6.23.8
#KERNEL_SRC ?= $(firstword $(wildcard /lib/modules/$(shell uname -r)/build /usr/src/linux))
ifeq ($(KERNEL_SRC),)
$(error You need to defin ...
libipt_ipp2p.c:417: warning: initialization from incompatible pointer type
libipt_ipp2p.c:418: warning: initialization from incompatible pointer type
libipt_ipp2p.c:420: warning: initialization from incompatible pointer type
libipt_ipp2p.c:421: warning: initialization from incompatible pointer type
原帖由 springwind426 于 2007-11-26 15:05 发表
终于编译通过了
对源代码进行了修改,现把修改的部分贴上
diff -dru ipp2p-0.99.6-r1/Makefile ipp2p-0.99.6-r1.new/Makefile
--- ipp2p-0.99.6-r1/Makefile 2007-11-23 18:16:57.000000000 +0800
+ ...
原帖由 getCookieID 于 2007-11-26 16:43 发表
内核:
2.6.22 源码 /usr/src/linux-2.6.22
iptables:
1.3.8 源码 /usr/src/iptables-1.3.8
步骤:
改Makefile
1、KERNEL_SRC= /usr/src/linux-2.6.22
2、IPTABLES_SRC = /usr/src/iptables-1.3.8
3 ...
# iptables -t mangle -I PREROUTING -p udp --dport 53 -j LOG
# tail -4 /var/log/messages
[quote]
Nov 26 23:54:33 PT_LINUX kernel: IN=HOME OUT= PHYSIN=ath0 MAC=00:14:78:71:0f:23:00:1b:77:37:54:10:08:00 SRC=172.17.39.103 DST=202.106.46.151 LEN=57 TOS=0x00 PREC=0x00 TTL=128 ID=48145 PROTO=UDP SPT=4286 DPT=53 LEN=37
Nov 26 23:54:57 PT_LINUX kernel: IN=HOME OUT= PHYSIN=ath0 MAC=00:14:78:71:0f:23:00:1b:77:37:54:10:08:00 SRC=172.17.39.103 DST=202.106.46.151 LEN=70 TOS=0x00 PREC=0x00 TTL=128 ID=48292 PROTO=UDP SPT=4286 DPT=53 LEN=50
Nov 26 23:55:03 PT_LINUX kernel: IN=HOME OUT= PHYSIN=eth1 MAC=00:14:78:71:0f:23:00:0a:e6:a9:64:a2:08:00 SRC=172.17.39.108 DST=202.106.0.20 LEN=59 TOS=0x00 PREC=0x00 TTL=128 ID=11185 PROTO=UDP SPT=1029 DPT=53 LEN=39
Nov 26 23:55:09 PT_LINUX kernel: IN=HOME OUT= PHYSIN=ath0 MAC=00:14:78:71:0f:23:00:1b:77:37:54:10:08:00 SRC=172.17.39.103 DST=202.106.46.151 LEN=80 TOS=0x00 PREC=0x00 TTL=128 ID=48357 PROTO=UDP SPT=4286 DPT=53 LEN=60
原帖由 platinum 于 2007-11-26 19:53 发表
/*init the module with default values*/
info->cmd = 0;
info->debug = 0;
+ memset(info, 0, sizeof(struct ipt_p2p_info));
+
}
这个似乎没有必要
原帖由 ShadowStar 于 2007-11-18 17:25 发表
不应该一点数据都没有下载啊。
这个屏蔽的不是迅雷的全部下载,仅仅是屏蔽了迅雷从其他候选资源进行的p2sp下载,原始资源还是可以下载的。
在迅雷的任务信息应该能看到“搜索候选资源发生错误,稍后重 ...
原帖由 skynet 于 2007-12-6 11:39 发表
我编译成功,messages日志出现这个提示:“kernel: ipt_ipp2p: no version for "struct_module" found: kernel tainted.”
执行:iptables -D INTPUT -m ipp2p --ipp2p -j DROP没有什么提示,lsmod | grep ipp ...
原帖由 fuleru 于 2007-11-18 08:58 发表
编译成功。谢谢
dmesg | grep IPP
IPP2P v0.99.5 loading
iptables -A FORWARD -p udp -m time --timestart 08:00 --timestop 20:00 --days Mon,Tue,Wed,Thu,Fri,Sat -m ipp2p --xunlei -j DROP
iptabl ...
原帖由 jick0214 于 2007-12-6 13:06 发表
我想请教一下为什么他用 dmesg | grep IPP IPP2P v0.99.5 loading
我用的时候显示余下
[root@porxy ~]# dmesg | grep IPP
IPP2P v0.8.1_rc1 loading
IPP2P v0.8.1_rc1 unloaded
IPP2P v0.8 ...
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |