ufw
Uncomplicated firewall.
A program for managing a netfilter firewall. It runs on top of iptables
and provides an easy-to-use interface. With
ufw
, you can set up rules based on services or ports.
Usage
Check firewall status.
sudo ufw status
Allow a service or port.
sudo ufw allow ssh
sudo ufw allow 22
Enable firewall.
sudo ufw enable
Subcommands
allow
- Enables the connection to the provided service.deny
- It black-holes the requests. Doesn’t respond. Used most of the time.reject
- Notifies that the port is closed.
Limitations
[!WARNING] Be careful when using
ufw
and Docker. For more information checkchaifeng/ufw-docker
.
Resources
- Uncomplicated Firewall #media/article