Nftables не может обрабатывать никакие команды

После обновления от Stretch до Buster и перехода от iptables к nftables команда nft не обрабатывает никакую заданную команду, кроме list, который ничего не печатает.

Вход nft flush ruleset выводит:

Error: Could not process rule: Invalid argument
flush ruleset
^^^^^^^^^^^^^^
Error: Could not process rule: Invalid argument
flush ruleset
^^^^^^^^^^^^^^

nft create table inet filter

Error: Could not process rule: Invalid argument
create table inet filter
^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Could not process rule: Invalid argument
create table inet filter
^^^^^^^^^^^^^^^^^^^^^^^^^

Даже с исходной конфигурацией в пакете debian он печатает ошибку для каждой строки в нем.

nft -f / etc / nftables.conf

/ etc / nftables.conf:

#!/usr/sbin/nft -f

flush ruleset

table inet filter {
    chain input {
        type filter hook input priority 0;
    }
    chain forward {
        type filter hook forward priority 0;
    }
    chain output {
        type filter hook output priority 0;
    }
}
/etc/nftables.conf:3:1-14: Error: Could not process rule: Invalid argument
flush ruleset
^^^^^^^^^^^^^^
/etc/nftables.conf:5:1-2: Error: Could not process rule: Invalid argument
table inet filter {
^^
/etc/nftables.conf:6:15-19: Error: Could not process rule: Invalid argument
    chain input {
                 ^^^^^
/etc/nftables.conf:9:15-21: Error: Could not process rule: Invalid argument
    chain forward {
                 ^^^^^^^
/etc/nftables.conf:12:15-20: Error: Could not process rule: Invalid argument
    chain output {
                 ^^^^^^
/etc/nftables.conf:3:1-14: Error: Could not process rule: Invalid argument
flush ruleset
^^^^^^^^^^^^^^
/etc/nftables.conf:5:1-2: Error: Could not process rule: Invalid argument
table inet filter {
^^
/etc/nftables.conf:6:15-19: Error: Could not process rule: Invalid argument
    chain input {
                 ^^^^^
/etc/nftables.conf:9:15-21: Error: Could not process rule: Invalid argument
    chain forward {
                 ^^^^^^^
/etc/nftables.conf:12:15-20: Error: Could not process rule: Invalid argument
    chain output {
                 ^^^^^^

Distro: Debian GNU / Linux 10 (buster)

nft: nftables v0.9.0 (Fearless Fosdick)

0
задан 4 October 2019 в 16:21
1 ответ

Выяснилось, что проблема в том, что модуль nf_tables не загружен. Проблема сохранялась на VPS, который работал в openVZ, который представляет собой виртуализацию на основе контейнеров. А поскольку модули iptables и nftables не могут работать одновременно, провайдер не стал бы ломать все системы только для поддержки nftables.

0
ответ дан 5 December 2019 в 00:29

Теги

Похожие вопросы