Today my iptables nat on the host system stopped working and I have no clue what happend! (That's very bad, I know)
All commands are executed as root user.
If I run $ iptables -t nat -L
I get the following error message:
$ iptables -t nat -L
iptables v1.4.7: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
There are no further updates available. I also restarted the server with several older kernels, but I always get the same error message.
My server is running on CentOS with the official OpenVZ kernel in the latest version.
$ uname -r
2.6.32-042stab088.4
Also tested kernel version: 2.6.32-042stab85.20 and 2.6.32-042stab084.26
First kernel in grub.conf:
title OpenVZ (2.6.32-042stab088.4)
root (hd0,1)
kernel /vmlinuz-2.6.32-042stab088.4 ro root=/dev/md2 rd_NO_LUKS rd_NO_DM nomodeset crashkernel=auto SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=de
initrd /initramfs-2.6.32-042stab088.4.img
The following updates were installed:
$ rpm -qa --last
vzctl-4.7.2-1.x86_64 Mon 05 May 2014 03:25:16 AM CEST
vzctl-core-4.7.2-1.x86_64 Mon 05 May 2014 03:25:14 AM CEST
util-linux-ng-2.17.2-12.14.el6_5.x86_64 Wed 30 Apr 2014 11:37:19 PM CEST
libuuid-2.17.2-12.14.el6_5.x86_64 Wed 30 Apr 2014 11:37:18 PM CEST
libblkid-2.17.2-12.14.el6_5.x86_64 Wed 30 Apr 2014 11:37:18 PM CEST
vzkernel-2.6.32-042stab088.4.x86_64 Mon 26 Apr 2014 09:01:00 AM CEST
nss-softokn-freebl-3.14.3-10.el6_5.x86_64 Sat 26 Apr 2014 09:01:00 AM CEST
nss-softokn-3.14.3-10.el6_5.x86_64 Sat 26 Apr 2014 09:01:00 AM CEST
bridge-utils-1.2-10.el6.x86_64 Tue 15 Apr 2014 02:22:41 PM CEST
openssl-1.0.1e-16.el6_5.7.x86_64 Wed 09 Apr 2014 10:14:03 AM CEST
...
lsmod
gives me the following:
$ lsmod | grep ip
iptable_nat 6302 0
nf_nat 23213 2 iptable_nat,vzrst
nf_conntrack_ipv4 9946 3 iptable_nat,nf_nat
nf_defrag_ipv4 1531 1 nf_conntrack_ipv4
nf_conntrack 80281 5 iptable_nat,vzrst,nf_nat,nf_conntrack_ipv4,vzcpt
ip6t_REJECT 4711 0
ip6table_mangle 3669 0
ip6table_filter 3033 0
ip6_tables 18988 2 ip6table_mangle,ip6table_filter
iptable_mangle 3493 0
iptable_filter 2937 0
xt_multiport 2716 0
ipt_REJECT 2399 0
ip_tables 18119 3 iptable_nat,iptable_mangle,iptable_filter
ipv6 322519 35 vzrst,ip6t_REJECT,ip6table_mangle
Running modprobe gives the following error:
$ modprobe /lib/modules/2.6.32-042stab088.4/kernel/net/ipv4/netfilter/iptable_nat.ko
FATAL: Module /lib/modules/2.6.32_042stab088.4/kernel/net/ipv4/netfilter/iptable_nat.ko not found.
But the file does exist:
$ ll /lib/modules/2.6.32-042stab088.4/kernel/net/ipv4/netfilter/iptable_nat.ko
-rwxr--r-- 1 root root 16K Apr 3 16:20 /lib/modules/2.6.32-042stab088.4/kernel/net/ipv4/netfilter/iptable_nat.ko*
Any ideas?