View Single Post
  #110  
Old 26th February 2007, 13:59
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

I finally got it working I compiled iptables against the kernel(2.6.20.3)....
here is the how to:

to patch the kernel you will need to download iptables and patch-o-matic


Code:
apt-get remove iptables ipchains --purge
Code:
cd /usr/src
iptables source - wget -c http://ftp.netfilter.org/pub/iptables/iptables-1.3.7.tar.bz2
patch-o-matic - wget -c http://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-20070322.tar.bz2
Linux kernel source - wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.3.tar.bz2
unpack the downloaded files:
Code:
tar xjf patch-o-matic-ng-20070322.tar.bz2 
tar xjf  iptables-1.3.7.tar.bz2
tar xjf linux-2.6.20.3.tar.bz2
First you need to run the make menuconfig command to
preconfigure the kernel otherwise *PATCHING WILL FAIL* change into the
linux-2.6.20.3 directory and run the make menuconfig command

Code:
apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential udev
cd /usr/src/linux-2.6.20.3
make clean && make mrproper
cp /boot/config-`uname -r` ./.config
make menuconfig
exit and save the config file. Now you will need to go into the patch-o-matic directory
Code:
cd /usr/src/patch-o-matic-ng-20070322
# KERNEL_DIR=/usr/src/linux-2.6.20.3 ./runme extras
Once you issue that command you will be prompt with the following

Code:
Hey! IPTABLES_DIR is not set.
Where is your iptables source code directory? [/usr/src/iptables]/usr/src/iptables-1.3.7

Once that is done you will be prompt for which patches you would like to apply, they also give you a little description on
what each patch does.

Once you have finished selecting which patches you want installed you will need to compile your iptables so you will
need to do the following in the iptables source directory.

Code:
cd /usr/src/iptables-1.3.7
make KERNEL_DIR=/usr/src/linux-2.6.20.3
make install KERNEL_DIR=/usr/src/linux-2.6.20.3
make clean
your iptables have been compiled now you can start compiling your kernel so you can issue the following in the kernel source directory

Code:
cd /usr/src/linux-2.6.20.3
make-kpkg clean
make-kpkg --initrd kernel_image kernel_headers
after the kernel build the kernel can be found in the /usr/src directory

Code:
cd /usr/src
dpkg -i *deb
Create A Ramdisk

Code:
apt-get install libhtml-template-perl libparse-recdescent-perl
cd /tmp
wget http://downloads.howtoforge.com/files/yaird_0.0.12-8bpo1_i386.deb
dpkg -i yaird_0.0.12-8bpo1_i386.deb

nano -w /boot/config-2.6.20.3-raysun1
[....]
# CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
[....]
create ramdisk
Code:
mkinitrd.yaird -o /boot/initrd.img-2.6.20.3-raysun1 2.6.20.3-raysun1
update grub
Code:
 update-grub
reboot system
Code:
shutdown -r now

hope it helps....

source:
http://www.linux-noob.com/forums/ind...topic=2182&hl=
http://www.howtoforge.com/kernel_compilation_debian

Last edited by ikkem; 13th April 2007 at 20:26.
Reply With Quote