Configuring UFW Firewall on VDS

VDS / VPS Servers · 25.02.2025
Configuring UFW Firewall on VDS

UFW Setup on Ubuntu

# Deny all incoming by default
ufw default deny incoming
ufw default allow outgoing

# Allow SSH
ufw allow 22

# Allow HTTP and HTTPS
ufw allow 80
ufw allow 443

# Enable firewall
ufw enable

# Check status
ufw status verbose
← Back to Knowledge Base Ask Support