Do you need to run any of these commands:

sudo ufw reload
sudo ufw disable
sudo ufw enable

after adding a rule via sudo ufw allow?

1 Answer 1


No. It's enough to just add it. But if you add rules in the files, you need to execute commit.

You can check user rules, as they're called with:

ufw status

You can also add verbose for some details:

ufw status verbose

Or numbered to know which rule to remove with delete. The syntax for this one is this:

ufw delete <RULE NUMBER>
  • 1
    1 more question please. What do you mean by "add rules in the files"?
    – iLW
    Commented Jun 13, 2017 at 20:07
  • 2
    sudo ufw commit results in Error: Invalid syntax Commented Jan 6, 2018 at 5:16
  • 1
    delete RULE needs reload? It seems like it is the case for me.. is it normal?
    – yeahman
    Commented Oct 2, 2020 at 18:19
  • 3
    you need to execute commit makes it sound like there's a command ufw commit Should be (?) ufw reload Commented Nov 11, 2021 at 20:29
  • 2
    There is no commit on ubuntu.
    – Eric
    Commented Mar 21, 2022 at 12:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .