我正在尝试在我的路由器中为 IPv6 添加 SNAT NFT 规则。通过接口 enp1s0 的任何传出数据包都应使用以下 IPv6 地址进行 SNAT。这些是我尝试过的规则和错误。
nft add rule inet nat postrouting oifname "enp1s0" snat ip6 to 2401:fb00:0:1ff::32d/64
错误:无法处理规则:没有这样的文件或目录添加规则 inet nat postrouting oifname enp1s0 snat ip6 to 2401:fb00:0:1ff::32d/64 ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
nft 添加规则 nat 后路由 oifname "enp1s0" snat 到 2401:fb00:0:1ff::32d
错误:无法解析主机名:不支持主机名的地址系列将规则 nat 后路由 oifname enp1s0 snat 添加到 2401:fb00:0:1ff::32d ^^^^^^^^^^^^^^^^^^ ^
nft 添加规则 nat 后路由 ip6 oifname enp1s0 snat 到 2401:fb00:0:1ff::32d
错误:语法错误,意外的 oifname 添加规则 nat postrouting ip6 oifname enp1s0 snat to 2401:fb00:0:1ff::32d ^^^^^^^
这些是我得到的问题。任何帮助,将不胜感激。