UFW
Uncomplicated Firewall (UFW) is a simple-to-use but powerful firewall management software. It is a wrapper around iptables, automatically writing rules for it.
Contents
Installation
Configuration
A basic rule set is:
ufw default deny incoming ufw default allow outgoing ufw allow ssh ufw allow 22
Web Servers
The following rules should allow any web server to operate.
ufw allow http ufw allow 80 ufw allow https ufw allow 443
FTP
ufw allow 20/tcp ufw allow 21/tcp ufw allow 989/tcp ufw allow 990/tcp
Passive configuration also utilizes a pool of ports. Recommended to use custom ports, so adjust as needed.
ufw allow 40000:42000/tcp