UFW 会在 iptables 和 ip6tables 中创建适当的规则吗?
答案1
这取决于你创建的规则是否是通用的,例如
ufw allow 22/tcp
或者特定于一个地址系列,例如
sudo ufw allow from 192.168.1.0/24 to any port 22 proto tcp
前任。:
$ sudo ufw allow from 192.168.1.0/24 to any port 22 proto tcp
Rule added
$ sudo ufw status numbered
Status: active
To Action From
-- ------ ----
[ 1] 22/tcp ALLOW IN 192.168.1.0/24
但
$ sudo ufw allow 22/tcp
Rule added
Rule added (v6)
$ sudo ufw status numbered
Status: active
To Action From
-- ------ ----
[ 1] 22/tcp ALLOW IN Anywhere
[ 2] 22/tcp (v6) ALLOW IN Anywhere (v6)