如何安装 iptables-translate?

如何安装 iptables-translate?

我在 CentOS 7 机器上。我想尝试使用nftables. 许多网站参考iptables-翻译作为将 iptables 规则转换为 nftables 规则的有用工具。我已经安装了该nftables.x86_64软件包并拥有该nft命令,但我没有 iptables-translate:

$ iptables-translate --help
-bash: iptables-translate: command not found

yum 搜索iptables-translate,但xtables-translate无果。如何安装此工具?

答案1

iptables-translate已打包新iptables版本。CentOS 8 附带 iptables-1.8.x,其中包含iptables-translate

[root@ed766839cb33 dnf]# dnf whatprovides iptables-translate
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:04:19 ago on Fri Oct  9 21:43:38 2020.
iptables-1.8.4-10.el8_2.1.i686 : Tools for managing Linux kernel packet filtering capabilities
Repo        : BaseOS
Matched from:
Filename    : /usr/sbin/iptables-translate

iptables-1.8.4-10.el8_2.1.x86_64 : Tools for managing Linux kernel packet filtering capabilities
Repo        : @System
Matched from:
Filename    : /usr/sbin/iptables-translate

iptables-1.8.4-10.el8_2.1.x86_64 : Tools for managing Linux kernel packet filtering capabilities
Repo        : BaseOS
Matched from:
Filename    : /usr/sbin/iptables-translate

相关内容