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 - 2024
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…») |
Admin iph (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
+ | [[Файл:B_1.gif |link=https://bit.ly/3tbFsd6| Доступная цена]] | ||
Текущая версия на 11:39, 30 марта 2020
Ошибка
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