When is it appropriate to ufw reload versus ufw disable && ufw enable, and vice versa?

The reason for asking:

According to the ufw man page, "reload reloads firewall."

However, documentation provided by the community (e.g., here, here, and here), instructs us to activate new settings by running:

$ sudo ufw disable
$ sudo ufw enable

I believe sudo ufw reload simply reloads the rules, while sudo ufw enable actually calls the reload command and also enables it at reboot.

Now note that sudo ufw disable was run first so the need for sudo ufw enable, and that being said I believe using the above outlined steps for new changes to ufw rules is for emphasis as sudo ufw reload will still suffice. Test it and see if the new rules don't apply successfully.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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