Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

UFW

Direct answer

Uncomplicated Firewall is an Ubuntu-oriented frontend that generates and manages host-firewall policy over Netfilter, simplifying common IPv4/IPv6 rules while still requiring verification of enablement, generated state and interactions with other managers.

When to use this

Use it when configuring, checking or troubleshooting UFW in Linux Security.

First 30 seconds

1. UFW is Ubuntu's simple firewall frontend.

2. Default deny incoming.

3. Allow SSH before enabling.

4. Rules by port/app/source.

5. Logs to syslog.

Operational verification

packet → ufw rules → allow/deny

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

A UFW rule shows frontend policy intent, but it does not show exclusive ruleset ownership, live match or end-to-end service health.

Suspicious evidence: disabled UFW, IPv6 disabled, Docker/container insertion, direct nft/iptables conflict, remote lockout, application profile stale, logging gap or status hides backend state.

Platform / version applicability
Platform and workload security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformPlatform and workload security
Scope / prerequisiteUse it when configuring, checking or troubleshooting UFW in Linux Security.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

UFW configuration/profile → enable/reload generation → Netfilter backend rules/order → packet match/verdict → log/endpoint → persistence

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • UFW installed ≠ UFW enabled or enforcing.
  • UFW status ≠ complete view of every backend rule inserted by other software.
  • Configuration file present ≠ parsed, loaded and effective runtime state.
  • One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.
Key checks
  • ufw status verbose — rules and defaults
  • ufw app list — app profiles
  • ufw logging on — enable logging
ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

A UFW rule shows frontend policy intent, but it does not show exclusive ruleset ownership, live match or end-to-end service health.

In depth

UFW (Uncomplicated Firewall) is a simple front-end for nftables/iptables on Ubuntu and Debian-based systems. It makes host firewall rules easy to write and read, which encourages actually enabling a firewall on every server.

ufw default deny incoming
ufw default allow outgoing
ufw allow from 10.0.10.0/24 to any port 22 proto tcp comment 'SSH from management'
ufw allow 443/tcp comment 'HTTPS'
ufw limit 22/tcp                       # rate-limit SSH attempts
ufw enable
ufw status numbered

Add the SSH allow rule before enabling the firewall on remote systems. Be aware that Docker inserts its own rules that bypass UFW for published container ports — bind containers to specific interfaces or use the DOCKER-USER chain.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Commands

ufw default deny incoming
ufw default allow outgoing
ufw allow from 10.99.0.0/24 to any port 22 proto tcp
ufw allow 443/tcp
ufw enable
ufw status numbered

Documented example, not captured output. Allow SSH before ufw enable on remote machines. Docker publishes ports through its own iptables rules and can bypass UFW; restrict with DOCKER-USER chain rules.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docPlatform and workload security current

Authoritative/upstream documentation reviewed for bounded claims in Linux Security → UFW. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/security/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
Uncomplicated FirewallUbuntu firewallufw security
Embedded reference data

Quick lookup tables

Linux Security → UFW proof map

Fast scope, effective-state, runtime-evidence and closure boundaries for Linux Security → UFW.

BoundaryEstablishDoes not establish
ScopeExact host, role, build/kernel, identity, workload and expected controlDoes not prove policy receipt or effective runtime state
Effective stateResultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controlsConfiguration presence does not prove enforcement
Runtime evidenceCorrelated events/audit, process/token/credential, packet/syscall and workload resultOne event, clean status or allow/deny does not prove complete security
ClosureOriginal allowed/denied workload works, unsafe state is removed and recovery/regression passCommit, restart, block or compliance result alone is not closure
Confirmation

Confirm action

Continue?