检查 ufw 默认策略操作

检查 ufw 默认策略操作

我知道设置 ufw 的默认行为非常容易,例如ufw default deny,但我该如何查看默认的 POLICY 操作是什么?它没有显示在 中ufw status

答案1

尝试ufw status verbose

root@cmp:~# ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

现在我将其更改为允许:

root@cmp:~# ufw default allow
Default incoming policy changed to 'allow'
(be sure to update your rules accordingly)

状态相应反映,默认已更改为允许:

root@cmp:~# ufw status verbose
Status: active
Logging: on (low)
Default: allow (incoming), allow (outgoing), disabled (routed)
New profiles: skip

相关内容