Openvz - iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2023
Перейти к:навигация, поиск
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Доступная цена


Ошибка

iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

при выполнении команды:
# iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o venet0 -j MASQUERADE


Подключаем модули в конфиге контейнера:

# vi /etc/vz/conf/17750.conf
IPTABLES="ip_tables iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ip_conntrack_ftp ipt_state iptable_nat ip_nat_ftp"
# vzctl set 17750 --netfilter full --save --setmode restart
# vzctl enter 17750

Проверяем работу командой:

# iptables -t nat -nvL
Chain PREROUTING (policy ACCEPT 4 packets, 282 bytes)
pkts bytes target prot opt in out source destination 
Chain POSTROUTING (policy ACCEPT 9 packets, 2226 bytes) pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 9 packets, 2226 bytes) pkts bytes target prot opt in out source destination