ufw delete all rules
53,309
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
Related videos on Youtube
Author by
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
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?
-
Lars Nyström about 3 yearsThis leaves a bunch of ufw chains in the iptables configuration. Do you know of a way to delete them as well?