Sudden problems with iptables not running
- by Fourjays
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 :)