LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ufw-status

show Uncomplicated Firewall state and rules

TLDR

Show whether the firewall is active and list rules
$ sudo ufw status
copy
List rules with numbers (needed before deleting by number)
$ sudo ufw status numbered
copy
Verbose status: default policies and listening ports
$ sudo ufw status verbose
copy

SYNOPSIS

ufw [--dry-run] status [numbered | verbose]

DESCRIPTION

ufw status reports whether Uncomplicated Firewall is active and prints the user rules currently loaded. After ufw enable, a typical line of output includes the policy (ALLOW/DENY/REJECT/LIMIT), direction, and port or application profile.numbered is the usual step before ufw delete number. verbose adds the default policies that apply when no rule matches, plus ports ufw knows are listening.This is a ufw subcommand, not a separate binary.

PARAMETERS

status

Print firewall activity and the current rule set.
numbered
Include a number for each user rule (use with ufw delete N).
verbose
Include default incoming/outgoing/routed policies, logging level, and listening sockets.
--dry-run
Global ufw flag: show what would change without applying (has no effect on a read-only status query).

INSTALL

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

CAVEATS

Reading status often needs root because rule files and iptables/nftables state are privileged. An inactive firewall still prints `Status: inactive` even if leftover netfilter rules exist from another tool.

HISTORY

Part of ufw (Uncomplicated Firewall), Ubuntu's frontend for iptables/nftables.

SEE ALSO

RESOURCES

Copied to clipboard
Kai