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
Версия от 07:27, 1 августа 2019; Admin iph (обсуждение | вклад) (Новая страница: « Ошибка 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 b…»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к:навигация, поиск


Ошибка

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