Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a sudden issue with iptables not running on my CentOS 5.8/DirectAdmin XenVPS. All I have done today is install PHP APC and run an update (although I admittedly didn't pay much attention today - I usually do). Iptables has been running fairly smoothly since I installed it over 6 months ago.

Basically when I try to run iptables -L it tells me:

iptables v1.3.5: can't initialize iptables table `filter': iptables who? (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.

I've looked around and tried a few things and it appears that maybe my kernel doesn't have the modules loaded? I've been reading this and tried the two commands they suggest to no avail. Except there does appear to be a mismatch on one bit of output:

-bash-3.2# cd /lib/modules
-bash-3.2# ls
2.6.18-194.32.1.el5xen  2.6.18-238.5.1.el5xen  2.6.18-274.7.1.el5xen  2.6.39.1-cs-domU
2.6.18-238.12.1.el5xen  2.6.18-238.9.1.el5xen  2.6.37.2-cs-domU       3.0.1-cs-domU
-bash-3.2# depmod -a
WARNING: Couldn't open directory /lib/modules/2.6.18-274.18.1.el5xen: No such file or directory
FATAL: Could not open /lib/modules/2.6.18-274.18.1.el5xen/modules.dep.temp for writing: No such file or directory

Does this mean the versions are out of sync? If so, what are my next steps to getting this fixed?

As you can probably tell I am still learning how to manage my server so please be very clear in all advice.

Many thanks :)

EDIT: Results of running uname -a as requested.

Linux server1.fortheinter.net 2.6.18-274.18.1.el5xen #1 SMP Thu Feb 9 13:27:02 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

EDIT 2: Results of checking the package list.

-bash-3.2# yum list | grep kernel
kernel-headers.x86_64     2.6.18-308.1.1.el5          installed
kernel.x86_64             2.6.18-308.1.1.el5          updates
kernel-debug.x86_64       2.6.18-308.1.1.el5          updates
kernel-debug-devel.x86_64 2.6.18-308.1.1.el5          updates
kernel-devel.x86_64       2.6.18-308.1.1.el5          updates
kernel-doc.noarch         2.6.18-308.1.1.el5          updates
kernel-xen.x86_64         2.6.18-308.1.1.el5          updates
kernel-xen-devel.x86_64   2.6.18-308.1.1.el5          updates
yum-kernel-module.noarch  1.1.16-21.el5.centos        base
share|improve this question
    
Was your kernel one of the things that was upgraded? –  Shane Madden Apr 13 '12 at 20:55
1  
uname -a would be helpful. Seems like the kernel your VPS is boot (I assume it is 2.6.18-274.18.1.el5xen) misses its part (modules). –  Vadym S. Khondar Apr 13 '12 at 20:57
    
Not sure if the kernel was updated as I was distracted and not paying attention to the update particularly. Added the uname -a result to the question. –  Fourjays Apr 14 '12 at 8:36
add comment

1 Answer

up vote 1 down vote accepted

Try (re)installing kernel 2.6.18-274.18.1.el5xen within VPS.

share|improve this answer
    
How do I do that? I understand that is a broad question so feel free to point me in the direction of a tutorial on it. EDIT: Is it even possible as it is something setup by my VPS provider? –  Fourjays Apr 14 '12 at 8:38
    
if you have root access, you could try yum list | grep kernel and see which options you have in repos (look at 'updates' in particular for this version) and which kernels you have installed. Have not much experience with xen, but maybe this is because your VPS was booted from kernel on host machine which is not installed in guest OS. Actually, you may not need vmlinuz itself in your guest but you probably still need /lib/modules for kernel which appears in uname -a output. –  Vadym S. Khondar Apr 15 '12 at 19:43
    
I've checked the yum list and it seems to make things more confusing... I've added the output to the post above and as you can see it shows another version entirely. I also did a search for xen packages, which shows some called xen-libs in updates. –  Fourjays Apr 16 '12 at 10:02
    
try wget http://ftp.riken.go.jp/Linux/centos/5.7/updates/x86_64/RPMS/kernel-xen-2.6.18-27‌​4.12.1.el5.x86_64.rpm; rpm -Uvh kernel-xen-2.6.18-274.12.1.el5.x86_64.rpm. You can use another link if your preferred mirror has this particular package. –  Vadym S. Khondar Apr 16 '12 at 15:04
    
It downloads and then says "prepares" and the first step reaches 100% then it says "ls: /etc/modprobe.d/*.conf: No such file or directory". Is it worth trying to install one of these kernels listed in the updates? Or won't they add the missing modules? –  Fourjays Apr 16 '12 at 17:10
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.