| Linode Forum https://forum.linode.com/ |
|
| iptables-restore command failing on new Debian 6 server https://forum.linode.com/viewtopic.php?f=19&t=9473 |
Page 1 of 1 |
| Author: | thump [ Thu Oct 18, 2012 3:31 pm ] |
| Post subject: | iptables-restore command failing on new Debian 6 server |
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. 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) Any thoughts on the matter would be most welcome. Thanks! |
|
| Author: | drpks [ Thu Oct 18, 2012 7:24 pm ] |
| Post subject: | Re: iptables-restore command failing on new Debian 6 server |
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" |
|
| Author: | thump [ Thu Oct 18, 2012 7:39 pm ] |
| Post subject: | Re: iptables-restore command failing on new Debian 6 server |
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. |
|
| Author: | Vance [ Thu Oct 18, 2012 11:55 pm ] |
| Post subject: | Re: iptables-restore command failing on new Debian 6 server |
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. |
|
| Author: | onslow77 [ Sat Oct 27, 2012 3:41 pm ] |
| Post subject: | Re: iptables-restore command failing on new Debian 6 server |
Sorry, Thought I had a solution, but misunderstood your problem. /Martin |
|
| Author: | TrentL [ Sat Mar 08, 2014 4:45 am ] |
| Post subject: | Re: iptables-restore command failing on new Debian 6 server |
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. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|