⌨️Uncomplicated Firewall (UFW)
Also known as UFW, ufw Command, Ubuntu Firewall
A small firewall tool on Ubuntu. You type short rules like allow 22.
Think of it like
Think of it like a light switch for a hard machine. You press easy buttons, and it does the hard part.
Example
Lucy sets up a new web server. She allows SSH and HTTPS with UFW, then turns it on.
Why it matters
Definition
Example code
console
$ sudo ufw allow 22/tcp
Rules updated
Rules updated (v6)
$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startupCommon mistake
Key takeaways
- 1Short rules. allow, deny, then a port.
- 2Off at first. You turn it on yourself.
- 3SSH before enable. Or you lock yourself out.