Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Oct 18, 2012 3:31 pm 
Offline
Newbie

Joined: Thu Sep 01, 2011 1:28 pm
Posts: 4
Hi all. Very much a student admin here. Per the "Securing Your Server" guide in the Linode Library, I'm attempting to firm up my new Debian 6 install.

When I run 'sudo iptables-restore < /etc/iptables.firewall.rules' I receive the following output (I get the same output if I enter the command as root without sudo):

Code:
FATAL: Module ip_tables not found.
'ptables-restore v1.4.8: iptables-restore: unable to initialize table 'filter

Error occurred at line: 1
Try `iptables-restore -h' or 'iptables-restore --help' for more information.


I've googled this content quite a bit, as well as searching these forums for what appear to be the distinguishing snippets of the error message, but unfortunately I'm not finding anything that speaks directly to my situation (as far as I can tell).

The iptables package is up to date, according to apt-get.

In spite of the error message, the first line in /etc/iptables.firewall.rules is definitely '*filter' (NOT " 'filter ").

The output of 'sudo iptables -L' is normal (according to the guide):

Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination


Any thoughts on the matter would be most welcome. Thanks!


Top
   
PostPosted: Thu Oct 18, 2012 7:24 pm 
Offline
Senior Member

Joined: Mon Dec 20, 2010 11:37 pm
Posts: 76
Module ip_tables isn't loaded (FATAL error message). Try "sudo modprobe ip_tables" and try again with "sudo iptables-restore < /etc/iptables.firewall.rules"


Top
   
PostPosted: Thu Oct 18, 2012 7:39 pm 
Offline
Newbie

Joined: Thu Sep 01, 2011 1:28 pm
Posts: 4
Okay, executed 'sudo modprobe ip_tables' with the following result:

Code:
FATAL: Module ip_tables not found.


This is probably going to painfully illustrate my ignorance, but I understand iptables-restore to be part and parcel of the iptables package, which is clearly installed and enabled on my system. How is it that I've got iptables running, but there's a critical portion of the package missing from a clean install? Surely I'm not the first person to run into this - I'm following the beginnner's guides step by step.


Top
   
PostPosted: Thu Oct 18, 2012 11:55 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
The ip_tables functionality is compiled statically into the Linode kernel. Modprobe fails because you don't need to load a module. Somehow, iptables-restore isn't properly detecting that this capability is in the kernel.

Your options include getting this fixed as a bug, using the stock Debian kernel, or using a different tool to manage firewall rules.


Top
   
PostPosted: Sat Oct 27, 2012 3:41 pm 
Offline
Senior Newbie

Joined: Sat Oct 20, 2012 1:19 pm
Posts: 5
Sorry, Thought I had a solution, but misunderstood your problem.

/Martin


Top
   
PostPosted: Sat Mar 08, 2014 4:45 am 
Offline

Joined: Sat Mar 08, 2014 4:31 am
Posts: 1
I encountered the same error as the original poster. I'm posting my (easy) solution here for others. I am using Ubuntu 12.04LTS, but I don't think that matters.

This problem often happens if iptables.firewall.rules was created on another system. For example, I created the file in Windows and then SFTP'ed it to my Linux server. This will not work.

The solution is to create the file from scratch using your Linux machine:

sudo nano /etc/iptables.firewall.rules

If you are using Putty, you can still copy-and-paste text from a Windows web browser into Putty's nano session and it will work.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group