免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: ShadowStar

[网络管理] IPP2P模块修改版,最新0.99.16 [复制链接]

论坛徽章:
0
发表于 2007-11-19 11:55 |显示全部楼层
不错,我试了下,发现可以禁止。。

我用的迅雷的版本比较旧些。。。

论坛徽章:
0
发表于 2007-11-19 12:12 |显示全部楼层
我测试用的是最新的迅雷,5.7.4的。

论坛徽章:
0
发表于 2007-11-19 13:34 |显示全部楼层
安装ipp2p-0.99.3,执行make时出现:make: Nothing to be done for `all'.
[root@sushe ipp2p-0.99.3]# make
make: Nothing to be done for `all'.
怎么解决?
还有:在-ipp2p-0.99.3说明文档里的一句话:modify the Makefile (change "IUSER = -I/usr/src/iptables/include" to wherever iptables.h is located)是什么意思,我应该修改哪个目录下的哪个文件,怎么修改?在此先谢过!
iptables是iptables1.3.8,源码在/usr/src/iptables-1.3.8目录下
ipp2p-0.99.3源码在/usr/src/ipp2p-0.99.3下
kernel是2.6.19.7,使用的是rhel5

论坛徽章:
0
发表于 2007-11-19 13:47 |显示全部楼层
export IPTABLES_SRC="$your_iptables_patch" KERNEL_SRC="$your_kernel_patch"

就好了

论坛徽章:
0
发表于 2007-11-19 13:54 |显示全部楼层
原帖由 ShadowStar 于 2007-11-18 22:16 发表


麻烦您抓一下包给我看看,只要抓到“搜索到x个候选资源”字样显示就可以。



不会抓包啊,用什么工具?SNIFFER还是ethereal?
忘说了,我这儿是IPTABLES+SQUID透明代理

论坛徽章:
0
发表于 2007-11-19 14:41 |显示全部楼层
原帖由 5639863 于 2007-11-19 13:54 发表



不会抓包啊,用什么工具?SNIFFER还是ethereal?
忘说了,我这儿是IPTABLES+SQUID透明代理


把你的iptables-save的输出贴出来,我看看。

论坛徽章:
0
发表于 2007-11-19 14:43 |显示全部楼层
楼主用的内核的版本是多少?iptables 版本呢?

我一直用的内核就是2.6.15.4 iptables是1.3.6的。

近来想重新编译下,l7也已经很旧的了。。

论坛徽章:
0
发表于 2007-11-19 14:58 |显示全部楼层
应该和内核版本、iptables版本没什么关系,只要在makefile指定好就OK。

我这边使用的是2.6.22的内核,1.3.8的iptables。

论坛徽章:
0
发表于 2007-11-19 15:11 |显示全部楼层
原帖由 5639863 于 2007-11-19 13:54 发表



不会抓包啊,用什么工具?SNIFFER还是ethereal?
忘说了,我这儿是IPTABLES+SQUID透明代理


我大概猜到为什么你那边还是能搜索到候选资源了。
1。你的透明代理是将发送到80端口的数据包转发到本地的SQUID代理服务器,然后再由SQUID代理发送到对方服务器。
2。迅雷搜索候选资源使用的http协议、80端口,ipp2p中的匹配也是对这个http数据的过滤。
3。由于通过SQUID后的数据并没有经过FORWARD链,而是经过了本地的INPUT和OUTPUT链,所以你添加在FORWARD链的--xunlei选项没有起作用。

建议你添加--xunlei规则到INPUT或OUTPUT链试验一下。

论坛徽章:
0
发表于 2007-11-19 16:13 |显示全部楼层
我这样指定的:
# export KERNEL_DIR=/usr/src/linux-2.6.19
# export IPTABLES_DIR=/usr/src/iptables-1.3.8

对楼上说的
export IPTABLES_SRC="$your_iptables_patch" KERNEL_SRC="$your_kernel_patch",所谓的your_iptables_patch是iptables-p2p-0.3.0a,your_kernel_patch是netfilter-layer7-v2.14吗,不知我理解的对不对


请圣骑士帮忙:只要在makefile指定,怎么指定呀,我的ipp2p-0.99.3目录下的Makefile内容如下:
[root@sushe src]# ls ipp2p-0.99.3/README
ipp2p-0.99.3/README
[root@sushe src]# more ipp2p-0.99.3/README
IPP2P, an extension to iptables to identify P2P traffic written by Eicke Friedri
ch.
This software is under development but it seems to run pretty stable. Use at you
r own risk!


Installation Instructions:
--------------------------
-modify the Makefile (change "IUSER = -I/usr/src/iptables/include" to wherever i
ptables.h is located)
-type "make"
-copy libipt_ipp2p.so to the iptables lib dir (/usr/lib/iptables/)
-insmod ipt_ipp2p.o / ipt_ipp2p.ko or copy to your kernel modules dir and do a "
depmod -a"
-create your rules


Versions:
---------
Currently IPP2P is tested to be working together with:
-Linux-Kernels 2.6: 2.6.3, 2.6.4, 2.6.6, 2.6.17
-Linux-Kernels 2.4: 2.4.18, 2.4.19, 2.4.20, 2.4.21, 2.4.22, 2.4.23, 2.4.26
-iptables (from netfilter.org) 1.2.7a, 1.2.8, 1.2.9, 1.2.11, 1.3.0, 1.3.1
[root@sushe src]# more ipp2p-0.99.3/Makefile
ifneq ($(KERNELRELEASE),)
obj-m := ipt_ipp2p.o

else
#KERNEL_SRC = /usr/src/linux
KERNEL_SRC ?= $(firstword $(wildcard /lib/modules/$(shell uname -r)/build /usr/s
rc/linux))
ifeq ($(KERNEL_SRC),)
$(error You need to define KERNEL_SRC)
endif

ifneq ($wildcard $(KERNEL_SRC)/include/linux/modversions.h),)
MODVERSIONS = -DMODVERSIONS
endif

_KVER = $(strip $(shell cat $(KERNEL_SRC)/Makefile | grep -e '^VERSION' | cut -d
"=" -f2))
_KPL = $(strip $(shell cat $(KERNEL_SRC)/Makefile | grep -e '^PATCHLEVEL' | cut
-d"=" -f2))
_KSUB = $(strip $(shell cat $(KERNEL_SRC)/Makefile | grep -e '^SUBLEVEL' | cut -
d"=" -f2))
KERNEL_SERIES=$(_KVER).$(_KPL)

ifeq ($(KERNEL_SERIES), 2.6)
        TARGET=ipt_ipp2p.ko
else
        TARGET=ipt_ipp2p.o
endif

SED = sed
IPTABLES_BIN = iptables
ifndef $(IPTABLES_SRC)
IPTVER = \
        $(shell $(IPTABLES_BIN) --version | $(SED) -e 's/^iptables v//')
IPTABLES_SRC = $(wildcard /usr/src/iptables-$(IPTVER))
#IPTABLES_SRC = /var/tmp/portage/net-firewall/iptables-1.3.8-r1/work/iptables-1.
3.8
endif

ifeq ($(IPTABLES_SRC),)
$(warning You need to install iptables sources and maybe set IPTABLES_SRC)
endif

IPTABLES_INCLUDE = -I$(IPTABLES_SRC)/include

ifneq ($(IPTVER),)
        IPTABLES_VERSION = $(IPTVER)
else
        IPTABLES_VERSION = $(shell cat $(IPTABLES_SRC)/Makefile | grep -e '^IPTA
BLES_VERSION:=' | cut -d"=" -f2)
endif

IPTABLES_OPTION = -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\"

#CC = /usr/bin/x86_64-pc-linux-gnu-gcc-4.1.2
CC = gcc
CFLAGS = -O3 -Wall



all: modules libipt_ipp2p.so

modules: $(TARGET)

ipt_ipp2p.o: ipt_ipp2p.h ipt_ipp2p.c
        $(CC) $(CFLAGS) -I$(KERNEL_SRC)/include -c ipt_ipp2p.c -D__KERNEL__ -DMO
DULE $(MODVERSIONS)

ipt_ipp2p.ko: ipt_ipp2p.h ipt_ipp2p.c
        $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules


libipt_ipp2p.so: libipt_ipp2p.c ipt_ipp2p.h
        $(CC) $(CFLAGS) $(IPTABLES_OPTION) $(IPTABLES_INCLUDE) -fPIC -c libipt_i
pp2p.c
        $(CC) -shared -o libipt_ipp2p.so libipt_ipp2p.o

clean:
        -rm -f *.o *.so *.ko .*.cmd *.mod.c
endif
[root@sushe src]#

对上面热情帮忙的老兄谢谢了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP