Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iptables calls for a kernel upgrade?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
BossOfTheGame
n00b
n00b


Joined: 14 Feb 2008
Posts: 49

PostPosted: Wed Feb 27, 2008 1:29 am    Post subject: iptables calls for a kernel upgrade? Reply with quote

I'm attempting to turn my gentoo box into a router and when I run itables -F it gives me this error:
iptables v1.3.8: can't initialize iptables table 'filter': Table does not exist ( do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded

I really don't know what to make of this error message. I'm not very savvy about kernel configurations or networking. Can anyone tell me what I should do?
Back to top
View user's profile Send private message
oldnavy23
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2007
Posts: 86
Location: USA

PostPosted: Wed Feb 27, 2008 1:36 am    Post subject: Reply with quote

this might help you get iptables setup and also too see if your kernel is setup to be able to run iptables




http://gentoo-wiki.com/HOWTO_Iptables_for_newbies
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Wed Feb 27, 2008 1:52 am    Post subject: Reply with quote

Your kernel probably doesn't have netfilter support built into it, and also not as modules. You'll have to build a new kernel with that stuff enabled. Basically, the easiest thing to do is do a "make menuconfig" in /usr/src/linux, then go to:
Quote:

Networking --->
Networking options --->
[ * ] Network packet filtering framework (Netfilter) --->
Core Netfilter Configuration --->
IP: Netfilter Configuration --->


Under each of those, enable everything as modules. On the current kernels, it'll take about a whole meg of disk space up. I.e., not much. That way, you don't have to worry about which specific module is needed for which specific feature. You can write your rules for iptables and whatever is needed will get used. There's also stuff for doing filtering with bridges, but it's safe to leave that stuff disabled. Later, if you feel like it, you can research the various features and get rid of some of the modules you know you'll never use.

I'm curious, though, why you're trying to do "iptables -F". If you don't have any rules yet, then there's nothing to flush.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
BossOfTheGame
n00b
n00b


Joined: 14 Feb 2008
Posts: 49

PostPosted: Wed Feb 27, 2008 2:22 am    Post subject: Reply with quote

After I enable all those things as modules I have to run make && make modules_install right?
To answer your question about using -F, thats what the tutorial told me to do :)

EDIT: I did do a make && modules_install and then a cp arch/i386/boot/bzImage /boot/kernel-2.6.23-gentoo-r8
then I rebooted and when I ran the same command I got the same error
Back to top
View user's profile Send private message
mmoufid
n00b
n00b


Joined: 21 Aug 2007
Posts: 22
Location: Ottawa ON

PostPosted: Thu Feb 28, 2008 3:58 pm    Post subject: Reply with quote

BossOfTheGame wrote:
EDIT: I did do a make && modules_install and then a cp arch/i386/boot/bzImage /boot/kernel-2.6.23-gentoo-r8
then I rebooted and when I ran the same command I got the same error

As didymos said, make sure you have all the networking support you want in your kernel:
Code:
    Networking  --->
      Networking options  --->
        [*] Network packet filtering framework (Netfilter)  --->
            IP: Netfilter Configuration  --->
              <M> IP tables support (required for filtering/masq/NAT)

Do you have support for automatic module loading in your kernel?
Code:
[*] Enable loadable module support  --->

If not, you need to manually assign certain modules to load at boot:
Code:
echo "ip_tables" >> /etc/modules.autoload.d/kernel-2.6
echo "iptable_filter" >> /etc/modules.autoload.d/kernel-2.6
update-modules
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum