iptables从新编译内核打补丁 重新编译内核 编译iptables
17-filter:qq msnmessanger, ICQ  ftp的的过滤
要编译的
要准备的软件
InBlock.gif -- 2.6的内核
InBlock.gif-- iptables的源码
InBlock.gif-- 对于内核的补丁包    一个补给iptables 一个补给内核的    
InBlock.gif-- 协议定义的软件包
下载上面的软件
下载上面的软件。 还有内核版本
InBlock.gif解压内核    
InBlock.giftar xf linux-2.6.26.10.tar.gz -C /usr/src
InBlock.giftar xf netfilter-layer7-v2.22.tar.gz -C /usr/src
InBlock.gif链接 linux
InBlock.gifln -s /usr/src/linux-2.6.28.10/ /usr/src/linux
InBlock.gif进入的linux    
InBlock.gif# cd /usr/src/linux/
InBlock.gif# patch -p1    <    ../netfilter-layer7-v2.22/kernel-2.6.25-2.6.28-layer7-2.22.patch    
InBlock.gif# cp /boot/config-2.6.18-164.el5    /usr/src/linux/.config
make 进入图形界面
InBlock.gif# make    menuconfig
设置这几项
Networking support → Networking Options →Network packet filtering framework →Core Netfilter Configuration
InBlock.gif<M>    Netfilter connection tracking support    
InBlock.gif<M>    “layer7” match support
InBlock.gif<M>    “ string ” match support
InBlock.gif<M>    “time”    match support
InBlock.gif<M>    “iprange”    match support
InBlock.gif<M>    “connlimit”    match support
InBlock.gif<M>    “state”    match support
InBlock.gif<M>    “conntrack”    connection    match support
InBlock.gif<M>    “mac”    address    match support
InBlock.gif<M>     "multiport" Multiple port match support
进行编译安装iptables
InBlock.gif # cp /etc/init.d/iptables ~/iptables                                            备份iptables的配置文件    
InBlock.gif     # cp /etc/sysconfig/iptables-config ~/
InBlock.gif# rpm    -e    iptables-ipv6    iptables    iptstate    --nodeps        卸载软件包
InBlock.gif# tar jxvf iptables-1.4.6.tar.bz2 –C    /usr/src                        解压iptables到/usr/src
InBlock.gif# cd /usr/src/iptables-1.4.6                                                             进入到这个文件里面
InBlock.gif# cp ../netfilter-layer7-v2.22/iptables-1.4.3forward-for-kernel-2.6.20forward/libxt_layer7.*     ./extensions/
InBlock.gif./configure    --prefix=/usr    --with-ksource=/usr/src/linux
InBlock.gifmake                                                                         安装
InBlock.gifmake install
安装l7
InBlock.gif# tar zxvf l7-protocols-2009-05-28.tar.gz
InBlock.gif# cd l7-protocols-2009-05-28
InBlock.gif# make install
InBlock.gif# mv ~/iptables    /etc/rc.d/init.d/
InBlock.gif启动iptables服务
InBlock.gif# service iptables start

安装完了就用iptables过滤 下面的内容等了
InBlock.gifbittorrent
InBlock.gifP2P filesharing / publishing tool    
InBlock.gifedonkey
InBlock.gifeDonkey2000 - P2P filesharing    
InBlock.gifkugoo
InBlock.gifKuGoo - a Chinese P2P program    
InBlock.gifmsn-filetransfer
InBlock.gifMSN (Micosoft Network) Messenger file transfers    
InBlock.gifmsnmessenger
InBlock.gifMicrosoft Network chat client    
InBlock.gifpplive
InBlock.gifChinese P2P streaming video    
InBlock.gifqq
InBlock.gifxunlei
InBlock.gif