Skip to main content

UFW auf Hetzner

Installation:

ssh hetzner
apt install -y ufw

Regeln setzen:

ufw default deny incoming
ufw default allow outgoing

ufw allow 22/tcp comment 'SSH (wird später auf 9999 geändert)'
ufw allow 9999/tcp comment 'SSH Custom Port'
ufw allow 80/tcp comment 'HTTP'
ufw allow 443/tcp comment 'HTTPS'
ufw allow 51820/udp comment 'Wireguard'

ufw enable
ufw status verbose

Nach SSH Port Änderung:

ufw delete allow 22/tcp
ufw reload