To delete a UFW (Uncomplicated Firewall) rule on Ubuntu or Debian Linux, you can use the ufw delete
command followed by the rule number.
Here is an example of how to delete a UFW rule:
sudo ufw delete 3
This will delete the UFW rule with the number 3
.
To view a list of all the UFW rules, you can use the ufw status numbered
command:
sudo ufw status numbered
This will display a list of all the UFW rules, along with their numbers. You can then use the ufw delete
command to delete the desired rule.