Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Kernel Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #101  
Old 22nd February 2007, 21:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Did you enable iptables during
Code:
make menuconfig
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Sponsored Links
  #102  
Old 22nd February 2007, 21:24
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

hi....
yes I did enable iptables at first I thought I overlooked it but it is enabled....
Reply With Quote
  #103  
Old 23rd February 2007, 16:48
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

There must be a config file for your new kernel in the /boot directory. What's the output of
Code:
grep -i iptables /boot/kernel_config
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #104  
Old 23rd February 2007, 18:51
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

Quote:
Originally Posted by falko
There must be a config file for your new kernel in the /boot directory. What's the output of
Code:
grep -i iptables /boot/kernel_config
?
hi....

the output is:

Code:
# grep -i iptables /boot/config-2.6.20.1-raysun3
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP6_NF_IPTABLES=m
this time I got it working I did not make a symlink to linux instead I cd into /usr/src/linux-2.6.20.1 and I followed your how to
at my first and second attempt the system kept hanging on boottime and after it booted I could not connect to the net...
thanks for reacting....
Reply With Quote
  #105  
Old 24th February 2007, 14:31
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

I am not able to run shorewall anymore.
Do I have to compile iptables against the new kernel? part of the output of shorewall show capabilities:

Code:
# shorewall show capabilities
NAT: Not available
Packet Mangling: Not available
Looked on google/clusty but I could not find a how to compile iptables against a kernel for debian/ubuntu....

thanks in advance....
Reply With Quote
  #106  
Old 24th February 2007, 14:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Did you use an old, working kernel configuration for configuring your new kernel? Or did you configure your new kernel from scratch?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #107  
Old 24th February 2007, 15:10
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

Hi....
I used an old working kernel configuration I used the 2.6.8....configuration and then I enabled xtables... during menuconfig...

Last edited by ikkem; 24th February 2007 at 15:24.
Reply With Quote
  #108  
Old 25th February 2007, 17:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What's the output of
Code:
which iptables
and
Code:
modprobe iptables
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #109  
Old 25th February 2007, 18:00
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

the out is:
Code:
# which iptables
/usr/local/sbin/iptables
Code:
# modprobe iptables
FATAL: Module iptables not found.
I am trying to compile iptables against the kernel I installed iptables-1.3.7 now I am going to compile the kernel hopefully it will work
is there a debian/ubuntu way for this?
thanks in advance....

Last edited by ikkem; 25th February 2007 at 20:09.
Reply With Quote
  #110  
Old 26th February 2007, 12: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 19:26.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.