Solved

Error applying iptable rules

Posted on 2011-02-27
15
1,358 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

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…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

18 Experts available now in Live!

Get 1:1 Help Now