This article covers how you can easily delete any UFW rule from Ubuntu system firewall. In fact, In Ubuntu Firewall, we can delete firewall rules by the rule number or the original rule by using ufw delete command.
How to find the corresponding firewall rule number using ufw on Ubuntu ?
Easiest and best method is to remove firewall rules by the rule number. We can find the corresponding rule number using ufw status numbered command:
$ ufw status numbered
Then Delete the rule using ufw delete command. or example, if you want to delete rule number '2', execute:
$ ufw delete 2
How to Delete All Firewall Rules on Ubuntu ?
The ufw reset command will remove all firewall rules and also it will disable the UFW on Ubuntu.
$ ufw reset