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:

delete RULE|NUM 
  • 1 more question please. What do you mean by "add rules in the files"?
    – iLW
    Jun 13, 2017 at 20:07
  • @iLW Take a look in /etc/ufw/. There are many rules there. What you add through the command line goes to user or user6 for IPv6. There should be 6 more folders there and a cover of sysctl.conf form /etc/sysctl and /etc/sysctl.d. Find a suitable guide for your OS and version. There are plenty of them in the air.
    – user147505
    Jun 13, 2017 at 20:15
  • 2
    sudo ufw commit results in Error: Invalid syntax Jan 6, 2018 at 5:16
  • 2
    you need to execute commit makes it sound like there's a command ufw commit Should be (?) ufw reload Nov 11, 2021 at 20:29
  • 1
    There is no commit on ubuntu.
    – Eric
    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 .