Solved

Error applying iptable rules

Posted on 2011-02-27
15
1,369 Views
Last Modified: 2013-11-15
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
Comment
Question by:Thyagaraj03
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
15 Comments
 
LVL 1

Expert Comment

by:jfk013097
ID: 34992321
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
 

Author Comment

by:Thyagaraj03
ID: 34993562
definitely once I'm back to work!
0
 

Author Comment

by:Thyagaraj03
ID: 34994320
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Thyagaraj03
ID: 35023731
It's on production system, anyone came across this? and how was that resolved?
0
 
LVL 10

Expert Comment

by:dfke
ID: 35031304
sudo depmod -a
0
 

Author Comment

by:Thyagaraj03
ID: 35033786
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
 

Author Comment

by:Thyagaraj03
ID: 35034336
Could this be added to other zones, I say firewall>IP Tables /IP Chains zone, which could be relevant zone for my question
0
 
LVL 1

Expert Comment

by:jfk013097
ID: 35034973
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
 

Author Comment

by:Thyagaraj03
ID: 35035090
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
 

Author Comment

by:Thyagaraj03
ID: 35035909
Any idea again?
0
 
LVL 4

Expert Comment

by:Tomun
ID: 35038182
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
 
LVL 1

Expert Comment

by:jfk013097
ID: 35038377
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
 

Author Comment

by:Thyagaraj03
ID: 35043069
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
 
LVL 1

Accepted Solution

by:
jfk013097 earned 500 total points
ID: 35043111
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
 

Author Comment

by:Thyagaraj03
ID: 35173881
raised a ticket
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question