Setup Steps
1. Install UFW (usually pre-installed on Ubuntu):
sudo apt install ufw -y2. Set default policies:
sudo ufw default deny incoming
sudo ufw default allow outgoing3. Allow SSH access (IMPORTANT - do this first!):
sudo ufw allow ssh
# or if using a custom port:
sudo ufw allow 2222/tcp4. Allow web traffic:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp5. Enable UFW:
sudo ufw enable6. Check status:
sudo ufw status verbose7. Allow access from a specific IP:
sudo ufw allow from 192.168.1.100 to any port 33068. Delete a rule:
sudo ufw status numbered
sudo ufw delete 59. Reset all rules:
sudo ufw reset10. Check UFW logs:
sudo ufw logging on
sudo tail -f /var/log/ufw.logRelated Guides
Fail2Ban Einrichtung
Schuetzen Sie Ihren Server vor Brute-Force-Angriffen.
VPN Einrichtung (WireGuard)
Richten Sie einen WireGuard VPN-Server ein.
ModSecurity WAF Einrichtung
Installieren Sie ModSecurity Web Application Firewall.
Certbot Automatische SSL-Erneuerung
Konfigurieren Sie die automatische SSL-Zertifikatserneuerung.