Для облегчения перехода можно конвертировать правила iptables в nftables с помощью утилит iptables-translate, iptables-restore-translate, iptables-nft-restore и т.п. Утилиты находятся в пакете iptables, который нужно установить дополнительно.
После чего возьмём какую-нибудь команду и пропустим её через iptables-translate.
Код: Выделить всё
olej@esprimop420:~$ cat /etc/debian_version
12.1
Уже установлено?
Код: Выделить всё
olej@esprimop420:~$ aptitude search iptables | grep ^i
i A iptables - administration tools for packet filtering and NAT
Установлен
автоматически:
Код: Выделить всё
olej@esprimop420:~$ aptitude show iptables
Пакет: iptables
Версия: 1.8.9-2
Состояние: установлен
Установлен автоматически: да
Мультиархитектура: сторонняя
Приоритет: необязательный
Раздел: net
Сопровождающий: Debian Netfilter Packaging Team <pkg-netfilter-team@lists.alioth.debian.org>
Архитектура: amd64
Размер в распакованном виде: 2.466 k
Зависит: libip4tc2 (= 1.8.9-2), libip6tc2 (= 1.8.9-2), libxtables12 (= 1.8.9-2), netbase (>= 6.0), libc6 (>= 2.34), libmnl0
(>= 1.0.3-4~), libnetfilter-conntrack3 (>= 1.0.6), libnfnetlink0 (>= 1.0.2), libnftnl11 (>= 1.1.5)
Рекомендует: nftables
Предлагает: firewalld, kmod
Ломает: iptables-nftables-compat (< 1.6.2~)
Заменяет: iptables-nftables-compat (< 1.6.2~)
Описание: administration tools for packet filtering and NAT
The iptables/xtables framework has been replaced by nftables. You should consider migrating now.
iptables is the userspace command line program used to configure the Linux packet filtering and NAT ruleset. It is targeted
towards systems and networks administrators.
This package contains several different utilities, the most important ones:
iptables-nft, iptables-nft-save, iptables-nft-restore (nft-based version)
iptables-legacy, iptables-legacy-save, iptables-legacy-restore (legacy version)
ip6tables-nft, ip6tables-nft-save, ip6tables-nft-restore (nft-based version)
ip6tables-legacy, ip6tables-legacy-save, ip6tables-legacy-restore (legacy version)
arptables-nft, arptables-nft-save, arptables-nft-restore (nft-based version)
ebtables-nft, ebtables-nft-save, ebtables-nft-restore (nft-based version)
Домашняя страница: https://www.netfilter.org/
Метки: admin::configuring, implemented-in::c, interface::commandline, network::firewall, protocol::ethernet, protocol::ip,
protocol::tcp, protocol::udp, role::program, role::shared-lib, scope::utility, security::firewall, use::monitor,
works-with::network-traffic