How to Check Ubuntu Firewall Status with ufw Status Command

Ubuntu UFW Firewall It is a complete firewall solution that is highly configurable and provides an easy-to-use interface to manage Iptables on Ubuntu.

UFW comes preinstalled with Ubuntu, but inactive by default, How can I know? Well, we just need to check the status of the firewall.

The ufw status command is the command that we are using to check Firewall Status on Ubuntu Linux.

ufw status

If ufw is not running, you will see the following output (Status: inactive).

Status: inactive

If it is active, you will see a list of firewall rules along with the active status.

How to check ubuntu firewall status with ufw status command 1

Note that ufw status command requires root privileges to execute or you will see the following, ERROR: You need to be root to run this script.

Verbose Output

If you need more information, check the verbose status of the Ubuntu Firewall.

ufw status verbose

As you can see verbose status reports include a couple of additional lines.

How to check ubuntu firewall status with ufw status command 2

It Shows the default firewall policy for incoming and outgoing network traffic.

Numbered Status Report

When you add a new rule, it is important to add it into the right position. In that case you need to see the Ubuntu Firewall Status as a list of numbered rules.

ufw status numbered

Remember that the order matters. For example, you will need to add a certain deny rule before an allowed rule.

How to check ubuntu firewall status with ufw status command 3

This is also really helpful when Deleting a rule via its number.

How to check ubuntu firewall status with ufw status command 4
Ubuntu Server Admin

Recent Posts

Advantech AOM-2721 is now Ubuntu Certified

Canonical announces that the Advantech AOM-2721 is officially joining the list of Ubuntu Certified Hardware.…

8 hours ago

Ruby and Rails Performance Roundup: The Backlog Edition

Yet again instead of tweets, a blog post. The backlog got out of hand -…

8 hours ago

How to Deploy OpenProject on Ubuntu VPS

This article provides a guide demonstrating how to deploy OpenProject on Ubuntu VPS. What is…

9 hours ago

Canonical integrates NVIDIA Nemotron 3.5 Lightning with Ubuntu for always-on AI agents

Canonical is pleased to announce that  NVIDIA’s newly introduced NVIDIA Nemotron 3.5 Lightning, an open,…

2 days ago

Xfwl4’s Second Preview Release

I’m pleased to announce the second preview release of xfwl4, Xfce’s Wayland compositor, version 4.21.1.…

2 days ago

How to Install, Secure, and Set Up MySQL on Ubuntu 26.04 LTS

If you have been using an ecommerce store to place online orders or have been…

3 days ago