32

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?

Yaron
  • 13,453

1 Answers1

59

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

sudo 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

SebMa
  • 2,927
  • 5
  • 35
  • 47
Yaron
  • 13,453