OpenVZ - FIX FATAL: Module ip tables not found

From vpsget wiki
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If you got the next error while trying to configure NAT using iptables inside OpenVZ VPS:

[root@vpscontainer /]# iptables -t nat -nvL
FATAL: Module ip_tables not found.
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.

And iptables nat modules are enabled on the server node you should remove the next line from the <container_ID>.conf file:

NETFILTER="stateless"

Reboot container after.

Also this could be fixed using vzctl:

vzctl set <container_ID> --netfilter full --save

""