cybersecuritysecurity
UFW
ufwsecurityfirewall
Plain English
UFW is Ubuntu’s easy firewall. With short commands like ufw allow ssh you decide what can reach your machine, and it blocks the rest.
Technical Definition
ufw writes iptables rules (nf_tables backend on current Ubuntu).
- ufw default deny incoming, ufw allow OpenSSH, ufw enable.
- ufw allow from 192.168.1.0/24 to any port 22 limits by source.
- ufw limit ssh rate-limits.
- ufw status numbered, ufw delete N.
- App profiles live in /etc/ufw/applications.d.
- Logs show as [UFW BLOCK] in the kernel log.
- Docker-published ports bypass ufw; bind them to 127.0.0.1.
Source: ufw(8); CompTIA Security+ SY0-701 Exam Objectives v6.0
UFW in practice
$ sudo ufw allow OpenSSH
$ sudo ufw default deny incoming
$ sudo ufw enable
$ sudo ufw status verboseIn the Wild
Allow SSH before enabling, or you lock yourself out of a remote server. Security+ SY0-701 objective 4.5. BNLC lesson 6.4.