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?


Solution 1:

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