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
Best Answer
I believe
sudo ufw reload
simplyreloads
the rules, whilesudo ufw enable
actually calls thereload
command and also enables it at reboot.Now note that
sudo ufw disable
was run first so the need forsudo ufw enable
, and that being said I believe using the above outlined steps for new changes toufw
rules is for emphasis assudo ufw reload
will still suffice. Test it and see if the new rules don't apply successfully.