Create a Pareto Cloud account
Firewall is on and configured
Check firewall status
First, determine which firewall system your distribution uses:
Ubuntu/Debian (UFW)
Check UFW status:
Enable UFW if not active:
Set default policies (recommended):
sudo ufw default allow outgoing
Recommended UFW Settings
For optimal security, always configure UFW with these default policies:
sudo ufw default allow outgoing
This creates a "default deny" policy that blocks all incoming connections while allowing outbound traffic, providing maximum security with minimal configuration.
Fedora/CentOS/RHEL (firewalld)
Check firewalld status:
sudo firewall-cmd --list-all
Enable firewalld if not active:
Set default zone (usually public is appropriate):
Arch Linux (iptables/nftables)
Check iptables rules:
For basic protection, install and enable ufw:
sudo systemctl enable --now ufw
sudo ufw enable
Basic firewall configuration
Allow essential services
For UFW (Ubuntu/Debian):
sudo ufw allow ssh
# Allow HTTP/HTTPS if running web server
sudo ufw allow 'Apache Full' # or nginx
sudo ufw allow 443/tcp
For firewalld (Fedora/CentOS/RHEL):
sudo firewall-cmd --permanent --add-service=ssh
# Allow HTTP/HTTPS
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
# Reload to apply changes
sudo firewall-cmd --reload
Testing and verification
Verify your firewall is working:
nmap -sS [your-ip-address]
# Check listening ports
sudo netstat -tuln
# or
sudo ss -tuln
SSH Warning
Be extremely careful when configuring firewalls on remote systems. Always ensure SSH access is allowed before enabling the firewall, or you may lock yourself out of the system.
Pro Tips
- Use fail2ban alongside your firewall for additional protection against brute force attacks
- Regularly review and update your firewall rules
- Consider using port knocking for additional SSH security
- Log dropped connections to monitor attack attempts
Important Notes
- Firewalls don't protect against all types of attacks
- Applications can still be vulnerable even behind a firewall
- Keep your system and applications updated regardless of firewall status
- Consider using application-level firewalls for additional protection