Updating Debian Etch Kernel to support Layer7
Edit your /etc/apt/source.list file
Then add the following Debian software repository
deb http://ftp.de.debian.org/debian etch main contrib non-free deb-src http://ftp.de.debian.org/debian etch main contrib non-free deb http://www.backports.org/debian etch-backports main contrib non-free
and update it using this command:
Update your server
Download some packages needed for compiling the kernel in Debian Etch.
Download the Kernel version 2.6.25 from www.kernel.org
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2
Download the iptables version 1.4.0
Download the layer7 version 2.20 and the layer7 protocols
wget http://downloads.sourceforge.net/l7-filter/l7-protocols-2008-04-23.tar.gz
Download the IPP2P package
Untar all the packages and create a symlink of newly downloaded kernel and iptables to your /usr/src directory.
ln -sf /usr/src/iptables-1.4.0 /usr/src/iptables
Go to your newly downloaded kernel directory which is /usr/src/linux and patch it with Layer7 patch to support Layer7 packet filtering.
patch -p1 < ../netfilter-layer7-v2.20/kernel-2.6.25-layer7-2.20.patch
Copy your previous kernel configuration
Start compiling the new Kernel using this command.
An ncurses-based configuration menu will appear on the screen.
Select Load an alternate configuration file
and select .config
Got to Networking –> Networking options –> Network packet filtering framework (Netfilter) –> Core netfilter configuration
then select
<M> Netfilter connection tracking support
And enable Layer7 support
<M> “layer7″ match support [*] Layer 7 debugging output
select exit and go to IP: Netfilter Configuration
Enable NAT
<M> IPv4 connection tracking support (required for NAT) <M> Full NAT
Save your new Kernel configuration and type this commands:
make-kpkg --initrd --append-to-version=-l7filter kernel_image kernel_headers
Compiling your new Kernel will take time depending on your processor speed. After the compilation, you can install now your new Kernel.
dpkg -i linux-headers-2.6.25-l7filter_2.6.25-l7filter-10.00.Custom_i386.deb
Restart your system.

