Home › Learn › Linux
Linux

What is UFW?

Uncomplicated Firewall — Ubuntu's front-end to iptables that lets you set a default-deny inbound firewall with simple allow rules.

How it works

Most desktops ship with no host firewall. UFW lets you deny all incoming by default and poke holes only for what you need. It's the single highest-value five-minute hardening step.

Example

In practiceRun 'ufw default deny incoming', 'ufw allow OpenSSH', 'ufw enable' — now only SSH is reachable from the network.

What's a safe UFW starting ruleset?

Default-deny incoming, allow only what you use (usually just SSH), default-allow outgoing.

Go deeper: Build a Hardened Linux Workstation

The complete, step-by-step guide — every command, config, and the reasoning behind it.

Get the guide