Check ufw default policy action

I know it's very easy to set the default behavior of ufw, e.g. ufw default deny, but how do I check what the default POLICY action is? It does not show in ufw status.


Solution 1:

Try ufw status verbose:

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

Now I change it to allow:

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

Status is reflected accordingly, the default has changed to allow:

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