Solved

Error applying iptable rules

Posted on 2011-02-27
15
1,357 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
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
 

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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Are you sitting there reading this and wondering how to get started with Linux? It almost seems like picking the right Linux distribution is about like picking the right college or buying a new car if you read some of the article out there. Relax… l…
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now