by @mikr13
Configure UFW (Uncomplicated Firewall) on Ubuntu/Debian VPS servers to restrict network access and minimize attack surface by controlling inbound and outbound traffic.
Configure UFW firewall to control network traffic and minimize attack surface on VPS servers.
This skill helps AI agents configure UFW (Uncomplicated Firewall) on Ubuntu/Debian servers. Without a firewall, every port is potentially accessible to the internet. A properly configured firewall creates a security perimeter that only allows necessary traffic.
Key capabilities:
Use this skill when you need to:
Critical understanding: Every open port is attack surface. Only open ports for services you're actually running.
UFW is usually pre-installed on Ubuntu. Install if missing:
sudo apt update
sudo apt install ufw -y
CRITICAL: Set these BEFORE enabling the firewall!
# Deny all incoming traffic by default
sudo ufw default deny incoming
# Allow all outgoing traffic by default
sudo ufw default allow outgoing
This creates a "whitelist" approach - nothing gets in unless explicitly allowed.
WARNING: You must allow SSH before enabling UFW, or you'll lock yourself out!
sudo ufw allow ssh
Or spec...