42.2.5. 単一の iptables および ip6tables ルールセットの nftables への変換
Red Hat Enterprise Linux は、iptables ルールまたは ip6tables ルールを、nftables で同等のルールに変換する iptables-translate ユーティリティーおよび ip6tables-translate ユーティリティーを提供します。
前提条件
-
nftablesパッケージがインストールされている。
手順
以下のように、
iptablesまたはip6tablesの代わりにiptables-translateユーティリティーまたはip6tables-translateユーティリティーを使用して、対応するnftablesルールを表示します。# iptables-translate -A INPUT -s 192.0.2.0/24 -j ACCEPT nft add rule ip filter INPUT ip saddr 192.0.2.0/24 counter accept拡張機能によっては変換機能がない場合もあります。このような場合には、ユーティリティーは、以下のように、前に
#記号が付いた未変換ルールを出力します。# iptables-translate -A INPUT -j CHECKSUM --checksum-fill nft # -A INPUT -j CHECKSUM --checksum-fill