How I installed Kernel 2.4.7 and IP Tables in a working fashion
Rob
rwideman@austin.rr.com
Fri, 10 Aug 2001 02:41:06 -0500
This is how I recompiled the Linux Kernel 2.4.7 w/ IP Tables 1.2.2
on my RH 7.1 box in a working fashion after 3 recompiles and TONS
of emails to Netfilter and Kernel Devel lists.
-DL the files needed to /usr/src
linux-2.4.7.tar.bz2 #or latest version but this will be used
http://www.kernel.org
iptables-1.2.2.tar.bz2 #or latest version but this will be used
http://netfilter.filewatcher.org
-at /usr/src unpack files
gzip -cd linux-2.4.7.tar.gz | tar xvf - #this will create a /usr/src/linux folder
#with kernel source
bzip2 -cd iptables-1.2.2.tar.bz2 | tar xf - #this will create a /usr/src/iptables-1.2.2
#for iptables
-kernel clean
cd /linux
make mrproper #just a big clean job
make clean #just another big clean job
cd ..
-iptables config
cd iptables-1.2.2
make pending-patches KERNEL_DIR=/usr/src/linux #will add bugfixes/tweaks to kernel
#source that isnt in there yet
make KERNEL_DIR=/usr/src/linux #makes the package
make install KERNEL_DIR=/usr/src/linux #installs the shared libraries and binaries
make patch-o-matic KERNEL_DIR=/usr/src/linux #OPTIONAL...i did NOT do this, just
#extra stuff if you want it
make experimental #will install iptables-save/restore into the kernel
make install-experimental #will install iptables-save/restore into the
kernel
cd ..
-kernel config
cd linux
make menuconfig #non-X configuration of kernel, it WILL probe HW as best as possible
make bzImage #will compile kernel
make dep #install dependencies (i think, someone correct me if not)
make modules #compiles the modules for the kernel
make modules_install #installs the modules to directory (dont know
#which one, have heard this from kenel mailing list)
-move kernel files to /boot
mv /arch/i386/boot/bzImage /boot/vmlinuz-2.4.7 #moves the kernel to /boot and renames it
mv /usr/src/System.map /boot/System.map-2.4.7 #moves System.map to /boot and renames it
cd /boot
rm-rf System.map #deletes the currently installed System.map
ln -s System.map-2.4.7 System.map #creates symbolic link for new System.map file
-edit lilo.conf
vi /etc/lilo.conf
##
image=/boot/vmlinuz-2.4.7 #now add the following to bottom of file for new
kernel install
label=Firewall-2.4.7
read-only
root=/hda5
##
-run lilo
lilo #will reconfig lilo for new kernel so it knows where
#files are
-reboot and choose new kernel #duh!
-edit lilo again if new kernel works
-change the default= to
default=Firewall-2.4.7 #IF your kernel works then do this, this
#will now make your system boot to the
#new kernel everytime your reboot your system
reboot
-testing the new iptables program
iptables #if it shows: iptables v1.2.2 on the second line then
#the iptables program works
iptables-save #IF you did the "make experimental" and "make
#install-experimental" it will show: generated
#by iptables-save v1.2.2...YOUR GOOD TO GO (hopefully)
########
# EOE (end of editing, lol)
########
I havent done my rule set yet but this should get you up in a newer version
anyways.
I dont think i need to post a rule set when working since this is what this
mailing list is for.
Thanks for all your help guys.
Rob
PS---NO LISCENCE, and someone needs to make this a HOWTO