• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1399
  • Last Modified:

Error applying iptable rules

When I try to use iptables command on one of my Rackspace cloud server, I'm getting the following error.

In an attempt to apply iptables rules with
iptables-apply -t 120 /etc/iptables.rules

Open in new window

and
iptables-restore < /etc/iptables.rules

Open in new window


I'm getting following error:

FATAL: Could not load /lib/modules/2.6.35.4-rscloud/modules.dep: No such file or directory
iptables-restore v1.4.4: iptables-restore: unable to initialize table 'filter'

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

Open in new window

How do I fix this?
0
Thyagaraj03
Asked:
Thyagaraj03
1 Solution
 
jfk013097Commented:
Can you please post the output of the following commands:ls
uname -r

ls /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter/nds

lsmod | grep iptables



0
 
Thyagaraj03Author Commented:
definitely once I'm back to work!
0
 
Thyagaraj03Author Commented:
uname -r
2.6.35.4-rscloud

Open in new window


ls /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter/nds
ls: cannot access /lib/modules/2.6.35.4-rscloud/kernel/net/ipv4/netfilter/nds: No such file or directory

Open in new window


lsmod | grep iptables

no output here
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
Thyagaraj03Author Commented:
It's on production system, anyone came across this? and how was that resolved?
0
 
dfkeCommented:
sudo depmod -a
0
 
Thyagaraj03Author Commented:
output of depmod -a :
WARNING: Couldn't open directory /lib/modules/2.6.35.4-rscloud: No such file or directory
FATAL: Could not open /lib/modules/2.6.35.4-rscloud/modules.dep.temp for writing: No such file or directory

Open in new window


output of ls /lib/modules/ :
2.6.32.1-rscloud
0
 
Thyagaraj03Author Commented:
Could this be added to other zones, I say firewall>IP Tables /IP Chains zone, which could be relevant zone for my question
0
 
jfk013097Commented:
OK some more things - your problem is not iptables, it's that the kernel modules versions don't align with the running kernel

1. What distro is this?
2. please post the result of ls -l /boot abd /boot/grub
3. output of ls /proc/modules
4. output of /boot/grub/grub.cfg (or /boot/grub/menu.lst if that doesn't exist)
5. output of /et/default/grub
6. Have you run the distro's update program (apt-get on debian variants, yum on redhat) and updated the kernel perhaps, or its modules?

Thanks
0
 
Thyagaraj03Author Commented:
1. What distro is this?
Ubuntu Karmic 9.10 server

2. please post the result of ls -l /boot abd /boot/grub
Nothing here under /boot

3. output of ls /proc/modules
It's just listed /proc/modules

4. output of /boot/grub/grub.cfg (or /boot/grub/menu.lst if that doesn't exist)
As there is nothing under /boot, so no output

5. output of /et/default/grub
No such file

6. Have you run the distro's update program (apt-get on debian variants, yum on redhat) and updated the kernel perhaps, or its modules?
Long ago I did safe upgrade.
0
 
Thyagaraj03Author Commented:
Any idea again?
0
 
TomunCommented:
You're running kernel version 2.6.35.4-rscloud but you only have the modules for 2.6.32.1-rscloud installed.

Since these are custom kernels provided by your host and not standard Ubuntu ones you'll have to ask them for help.
0
 
jfk013097Commented:
You will either need to raise a ticket with Rackspace support, asking for the kernel modules to accompany your running kernel, or build them yourself from source. If you choose the latter you will need to install the kernel sources and build your own custom kernel from there - not ideal on a cloud based system, there are many gotchas for the uninitiated.
0
 
Thyagaraj03Author Commented:
Can you place some comments that what and how should i ask/interact them. What is that ticket, what should I say them?. Is that a problem at the Rackspace provider?
0
 
jfk013097Commented:
Ticket = Support Request, either phone them -  24/7 Support 0800 988 0300 | +44 (0)20 8734 2700 or there is an email form on the top right hand side of www.rackspace.co.uk

The details they need are as follows:

-----
My server is running kernel version 2.6.35.4-rscloud but the installed kernel modules are for 2.6.32.1-rscloud and obviously will not load with this kernel. Since this is a rackspace custom kernel package please can you provide a package, or a link to somewhere I can download them from?
-----  
0
 
Thyagaraj03Author Commented:
raised a ticket
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now