我在 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