Skip to content

Firewall

The default firewall configuration tool on Ubuntu is ufw. It is disabled by default.

Quick Start

Enable ufw

sudo ufw enable

Open a port

sudo ufw allow 22

Sanity check rule before applying

sudo ufw --dry-run allow http

View status

sudo ufw status

ufw Application Integration

Applications that open ports can include a ufw profile, the profiles are kept in /etc/ufw/applications.d

View application profiles

sudo ufw app list

View profile details

sudo ufw app info Samba

Enable application profile

sudo ufw allow Samba

Resources


Last update: August 12, 2023
Created: May 27, 2023