Iptables re-compile the kernel patching re-compile the kernel iptables17-filter: qqmsnmessanger, ICQftp filtering the software to be compiled -- 2.6 kernel -- iptables source code -- for kernel patch package one supply iptables one supply kernel -- download the software above the protocol definition package
IptablesRe-compile the kernel by patching and re-compile the kernel
Iptables17-filter: filtering qq msnmessanger and ICQ ftp
To compile
Software to be prepared
-- Kernel 2.6
-- Source code of iptables
-- For the kernel patch package, one supply iptables and one supply kernel
-- Protocol-defined software package
Download the above Software
Download the above Software. There are also kernel versions
Decompress the kernel
Tar xf linux-2.6.26.10.tar.gz-C/usr/src
Tar xf netfilter-layer7-v2.22.tar.gz-C/usr/src
Link to linux
Ln-s/usr/src/linux-2.6.28.10 // usr/src/linux
Linux
# Cd/usr/src/linux/
# Patch-p1 <../netfilter-layer7-v2.22/kernel-2.6.25-2.6.28-layer7-2.22.patch
# Cp/boot/config-2.6.18-164.el5/usr/src/linux/. config
Make interface
# Make menuconfig
Set these items
Networking support → Networking Options → Network packet filteringframework → Core Netfilter Configuration
Netfilter connection trackingsupport
"Layer7" match support
"String" match support
"Time" matchsupport
"Iprange" matchsupport
"Connlimit" matchsupport
"State" matchsupport
"Conntrack" connection match support
"Mac" address match support
"Multiport" Multiple port matchsupport
Compile and install iptables
# Cp/etc/init. d/iptables ~ /Iptables backup iptables configuration file
# Cp/etc/sysconfig/iptables-config ~ /
# Rpm-e iptables-ipv6 iptables iptstate -- nodeps uninstall package
# Tar jxvf iptables-1.4.6.tar.bz2? C/usr/src decompress iptables to/usr/src
# Cd/usr/src/iptables-1.4.6 into this file
# Cp ../netfilter-layer7-v2.22/iptables-1.4.3forward-for-kernel-2.6.20forward/libxt_layer7. *./extensions/
./Configure -- prefix =/usr -- with-ksource =/usr/src/linux
Make installation
Make install
Install l7
# Tar zxvf l7-protocols-2009-05-28.tar.gz
# Cd l7-protocols-2009-05-28
# Make install
# Mv ~ /Iptables/etc/rc. d/init. d/
Start the iptables service
# Service iptables start
After the installation is complete, use iptables to filter the following content and wait for bittorrent.
P2P filesharing/publishing tool
Edonkey
EDonkey2000-P2P filesharing
Kugoo
KuGoo-a Chinese P2P program
Msn-filetransfer
MSN (Micosoft Network) Messenger filetransfers
Msnmessenger
Microsoft Network chat client
Pplive
Chinese P2P streaming video
Qq
Xunlei
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.