Back to documentation
Security
Configuring the Firewall
Set up UFW firewall rules to protect your server from unauthorized access.
Intermediate5 min readUpdated 2024-02-01
About UFW
UFW (Uncomplicated Firewall) is a user-friendly interface for iptables. It helps you:
- Block unwanted traffic
- Allow specific ports and services
- Whitelist IP addresses
- Log connection attempts
Default rules
When you set up the firewall:
- Default: Deny all incoming
- Allow: SSH (port 22)
- Allow: HTTP (port 80)
- Allow: HTTPS (port 443)
This keeps your server secure while allowing web traffic.
Adding rules
To add a firewall rule:
- Go to Security > Firewall
- Click "Add Rule"
- Choose:
- Action: Allow or Deny
- Port: Port number or range
- Protocol: TCP, UDP, or both
- Source: Any or specific IP
- Click "Add"
Managing rules
In the firewall interface:
- View all active rules
- Enable/disable individual rules
- Delete rules you no longer need
- Reorder rule priority
Screenshots

Related Features
Ready to try Server Compass?
Download the app and deploy your first application in under 5 minutes.
Download Server Compass