LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-31-2011, 12:13 PM   #1
Tommyy
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Rep: Reputation: Disabled
Problem with custom kernel and IPtables.


Hey. I am an Arch Linux user ( 64 bit ) and I am trying to compile a custom Linux kernel. I have done it successfully and it works for the most part but IPtables doesn't seem to want to work.

When doing IPtables -L I get this:

Code:
iptables v1.4.12: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
This was after I had changed some of the network settings in menuconfig. Before IPtables would work but I wouldn't be able to connect to the internet at all. I am not very good with firewalls...

By the way the kernel version is 3.0.4.

Last edited by Tommyy; 08-31-2011 at 12:14 PM. Reason: Added some information.
 
Old 08-31-2011, 12:16 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

Do you have ip_tables loaded within your custom kernel? Try running the following, then run iptables -L to make sure that the ip_tables module is loaded:
Code:
modprobe ip_tables
Let me know what happens.

Cheers,

Josh
 
Old 08-31-2011, 12:20 PM   #3
Tommyy
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Ran as root and got:

Code:
FATAL: Module iptables not found.
I'm guessing I have to compile it as a module in menuconfig?

Last edited by Tommyy; 08-31-2011 at 12:22 PM.
 
Old 08-31-2011, 12:22 PM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Looks like you forgot the underscore... iptables and ip_tables are different things
 
Old 08-31-2011, 12:25 PM   #5
Tommyy
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Oops heh sorry about that. After doing modprobe ip_tables then iptables -L I get the same results as last time.

Code:
iptables v1.4.12: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
 
Old 08-31-2011, 12:27 PM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Try following your output and run insmod with netfilter/iptables and see if it getting initialized in the first place.
 
Old 08-31-2011, 12:34 PM   #7
Tommyy
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
I hope this is what you meant: insmod ip_tables?

Code:
insmod: can't read 'ip_tables': No such file or directory
 
Old 08-31-2011, 04:08 PM   #8
Tommyy
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
I figured this problem out. It seems that IPtables wasn't the problem at all. Even when I enabled IPtables in the kernel it seems that Gufw/Ufw wasn't working with the kernel. So I manually set up IPtables and it worked. Weird.
 
Old 09-01-2011, 08:19 AM   #9
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
What do you mean you manually set it up? As in you compiled from source? Glad to hear you got it figured out. If it is officially fixed, mark your thread as solved for us, thanks!
 
Old 09-01-2011, 05:08 PM   #10
Tommyy
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Well I installed it from the repos with pacman but when I said manually set it up I meant that I didn't use Gufw/Ufw but I configured it from the terminal. Using the iptables command.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't IPtables-restore since I installed a custom Kernel User-N@me Red Hat 5 06-13-2011 08:24 PM
iptables-restore fails on boot with custom kernel burntfuse Fedora 2 06-22-2006 09:52 AM
Problem Compiling Custom Kernel E Pierce Debian 9 08-09-2005 04:48 AM
compiling iptables into custom kernel straxus Linux - Newbie 1 03-26-2005 10:32 PM
Problem with custom kernel iasion Linux - Software 3 04-05-2004 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration