Save 60% Limited-time offer: save up to 60% on hosting. View plans →

A Beginner's Guide to the UFW Firewall

UFW, the Uncomplicated Firewall, makes Linux firewall rules readable. A basic setup takes a few commands.

A Beginner's Guide to the UFW Firewall

UFW, the Uncomplicated Firewall, makes Linux firewall rules readable. A basic setup takes a few commands.

Default policy

Deny all incoming traffic by default and allow outgoing. This closes everything you have not deliberately opened.

Allow what you need

Allow SSH first so you do not lock yourself out, then ports 80 and 443 for web traffic and any other required services.

Enable and review

Enable UFW, check status regularly and remove rules for services you no longer run.

The bottom line

Deny by default, allow only what you use, and always allow SSH before enabling.

Ready to get your business online?

Fast NVMe hosting, free SSL and free migration — with a 30-day money-back guarantee and real local support.

See hosting plans

Keep reading