文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>2.6内核下成功编译IPP2P

2.6内核下成功编译IPP2P

时间:2007-06-29  来源:sulin515

用户的防火墙(LINUX)要求能把P2P DROP掉,保证网络的畅通。几个周期都在与这事周旋,一直以为用最新系统版本(新的版本会解决一些以前存在的问题)和新的iptables 版本,会行,结果一直没对,后又考虑是不是编译方式没对,也不行,然后又考虑了好多因素:硬盘原因,CPU双核,主板,结果都没对。一次又一次的重复着,结果却是错误,错误,还是错误,看了网上好多朋友也遇到这样的问题,老是提示段错误,什么字段未定义等。迷茫中突然想起看看README里的支持说明,晕,发现IPP2P支持内核版本为2.6.17  iptables  版本为1.3.1,找到2.6.17内核来安(没找到debian的,就用了ubuntu server 6.10)安装好后更新:aptitude update && aptitude -y upgrade

安装编译内核时必须的包:
aptitude install build-essential libncurses-dev kernel-package fakeroot
下载IPP2P和iptables,0.8.2其实也支持iptables-1.3.5
wget http://www.ipp2p.org/downloads/ipp2p-0.8.2.tar.gz
wget http://ftp.netfilter.org/pub/iptables/iptables-1.3.5.tar.bz2
解压:
tar zvxf ipp2p-0.8.2.tar.gz
tar jvxf iptables-1.3.5.tar.bz2
下载内核headers 编译IPP2P时会在里面读几个文件。
aptitude install linux-headers-2.6.17-10-generic
cd ipp2p-0.8.2
编译,指定kernerl iptables源文件的路径。
KERNEL_SRC=/usr/src/linux-headers-2.6.17-10-generic IPTABLES_SRC=/usr/src/iptables-1.3.5 make
拷贝相应模块:
cp libipt_ipp2p.so /lib/iptables/
cp ipt_ipp2p.ko /lib/modules/2.6.17-10-generic/kernel/net/ipv4/netfilter/
更新,加载IPP2P:
depmod -a
modprobe ipt_ipp2p
如果没有错误提示,就可以看的到了:
lsmod
************************************
iptable_filter          4224  1
ipt_ipp2p              10112  1
ip_tables              15204  1 iptable_filter
x_tables               16132  2 ipt_ipp2p,ip_tables
************************************
iptables -A FORWARD -p tcp -m ipp2p --bit -j DROP
iptables-save
************************************
root@nat:/usr/src# iptables-save
# Generated by iptables-save v1.3.5 on Fri Jun 29 02:27:14 2007
*filter
:INPUT ACCEPT [440:32879]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [265:45656]
-A FORWARD -p tcp -m ipp2p --bit -j DROP
COMMIT
# Completed on Fri Jun 29 02:27:14 2007
************************************

还可以通过:
iptables -m ipp2p --help
iptables -m string --help
看到相应的帮助。

这个问题终于解决了,可以让IPP2P和string同时工作了,下周就换用新NAT了。哈哈!

相关阅读 更多 +
排行榜 更多 +
一剑灭天

一剑灭天

角色扮演 下载
戮仙战纪

戮仙战纪

角色扮演 下载
头号海贼王手机版

头号海贼王手机版

棋牌卡牌 下载