Ubuntu: ufw delete all rules


I'm trying to understand and build my own firewall for the first time.

I'm very new to this kind of things.

I came up to ufw and added some rules to test it.

Is there any way of deleting all the rules at once with a single command?


If you want to turn off UFW completely and delete all the rules, you can use "reset" command:

ufw reset  

Afterwards you can start it again (fresh clean) using:

sudo ufw enable  

More info can be found in this tutorial and the official documents

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »