LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ufw-reset

Reset Uncomplicated Firewall to installation defaults

TLDR

Simulate a reset without changing anything
$ sudo ufw --dry-run reset
copy
Reset the firewall to its default state
$ sudo ufw reset
copy
Reset without confirmation
$ sudo ufw --force reset
copy

SYNOPSIS

ufw [--dry-run] [--force] reset

DESCRIPTION

ufw reset disables Uncomplicated Firewall and restores it to the installation defaults. It is a ufw subcommand, not a separate binary.The command removes the rules you added, reloads the default policies, and leaves the firewall disabled. After a reset, enable it again with ufw enable and add rules with ufw allow, ufw deny, ufw reject, or ufw limit.

PARAMETERS

reset

Disable the firewall and restore installation defaults
--dry-run
Show what would change without applying it
--force
Do not ask for confirmation

INSTALL

sudo dnf install ufw
copy
sudo pacman -S ufw
copy
sudo apk add ufw
copy
sudo zypper install ufw
copy

CAVEATS

Requires root or sudo. A reset deletes existing ufw rules. On a remote host this can lock you out once you enable the firewall again unless you add SSH (or another management) rules first. --dry-run shows the planned change; --force skips the confirmation prompt.

HISTORY

Part of ufw (Uncomplicated Firewall), the Ubuntu-originated frontend for iptables/nftables.

SEE ALSO

RESOURCES

Copied to clipboard
Kai