To install the L7-filter project, we need to patch our kernel with the patch provided by the source found at http://l7-filter.sourceforge.net. To do that, we need the kernel source. The next operation would be to apply the iptables patch, recompile iptables, and install the protocol definitions files. Let's go deeper into the process.
The first step is to download the kernel source we want from http://www.kernel.org. Next, we need to download L7-filter from http://l7-filter.sourceforge.net.
For this chapter, we used kernel source 2.6.12.5 and L7-filter version 2.0 beta. After downloading what you need to the /usr/src
folder, unzip the L7-filter TAR archive as follows:
router:/usr/src# tar xfvz netfilter-layer7-v2.0-beta.tar.gz netfilter-layer7-v2.0-beta/ netfilter-layer7-v2.0-beta/stray_code netfilter-layer7-v2.0-beta/for_older_kernels/ netfilter-layer7-v2.0-beta/for_older_kernels/kernel-2.6.9-2.6.10-layer7-1.2.patch netfilter-layer7-v2.0-beta...