Q:用 ipp2p 封禁 BT 过程介绍
  A:RH AS3 内核为: 2.4.21-15.EL。iptables版本为:1.2.9
   
    1. 下载最新的patch-o-matic-ng补丁和最新的iptables源代码。放到/usr/src 下
   
    替换 ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/ patch-o-matic-ng
   
    替换 www.netfilter.org/files/iptables-1.3.1.tar.bz2 iptables
   
    2. 如果你的系统里没有安装内核源码请自行安装。解压缩patch-o-matic-ng和iptables包
   
    tar -jxvf patch-o-matic-ng-20050302.tar.bz2
   
    tar -jxvf iptables-1.31..tar.bz2
   
    3. 给内核打补丁
   
    cd /usr/src/patch-o-matic-ng-20050302
   
    #KERNEL_DIR=/usr/src/linux-2.4 IPTABLES_DIR=/usr/src/iptables-1.3.1 ./runme extra
   
    按照提示打相应的补丁就可以了。我只选择了ipp2p,connlimit,time模块
   
    4. 编译内核
   
    cd /usr/src/linux-2.4
   
    make prproper
   
    make config
   
    在这里的前半部分一直安回车就可以了。遇到network option的部分时候选择需要的模块即可。
   
    然后在一路回车至结束。
   
    make dep
   
    make clean
   
    make bzImage
   
    make modules
   
    make modules_install
   
    make install
   
    reboot
   
    启动新内核
   
    5. 编译iptables
   
    cd /usr/src/iptables-1.3.1
   
    make KERNEL_DIR=/usr/src/linux-2.4
    make BINDIR=/sbin LIBDIR=/lib MANDIR=/usr/share/man install
    如果没什么错误的话iptables就升级到1.3.1的版本了
   
    6. 测试
   
    Iptables -m ip2p2 -help
    iptables -A FORWARD -m ipp2p --edk --kazaa --bit -j DROP