Firewall
檢查 ufw 預設策略操作
我知道設置 ufw 的預設行為非常容易,例如
ufw default deny
,但是如何檢查預設的 POLICY 操作是什麼?它沒有顯示在ufw status
.
嘗試
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