19

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.

1 Answer 1

24

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
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.