First I get the sources from http://www.netfilter.org/projects/iptables/files/iptables-1.3.5.tar.bz2
I uncompress it using:
tar jxvf iptables-1.35.tar.bz2
Then I get the patch-o-matic-ng file http://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-20060131.tar.bz2
I also uncompress it using:
tar jxvf patch-o-matic-ng-20060131.tar.bz2
I apply it using:
KERNEL_DIR=/usr/src/linux-2.6.15.2/ IPTABLES_DIR=/usr/local/src/iptables-1.3.5/ ./runme bass
Now I apply the l7-filter patch:
cd /usr/local/src/iptables-1.3.5
patch -p1 < /usr/local/src/netfilter-layer7-v2.1/iptables-layer7-2.1.patch
chmod +x extensions/.layer7-test
Now I need to modify the Makefile in order to setup the dir variables:
KERNEL_DIR=/usr/src/linux-2.6.15.2
LIBDIR:=/lib
BINDIR:=/sbin
MANDIR:=/usr/share/man
Now is time to compile and install:
make
make install
And now I need to recompile and install the kernel:
make menuconfig
make
make modules_install
cp /usr/src/linux-2.6.15.2/arch/i386/boot/bzImage /boot/vmlinuz-2.6.15
cp /usr/src/linux-2.6.15.2/System.map /boot/System.map-2.6.15
/sbin/mkinitrd /boot/initrd-2.6.15 2.6.15.2