Härtung
Server-Härtung über Ansible - automatisiert und reproduzierbar.
Sicherheitsschichten
Section titled “Sicherheitsschichten”graph TB
subgraph Hardening ["Sicherheitsschichten"]
direction TB
SSH["SSH-Härtung<br/>- Kein Passwort-Login<br/>- Root: prohibit-password<br/>- Pubkey-Auth aktiv"]
UFW["UFW Firewall<br/>- Default: deny incoming<br/>- Port 22: rate-limited<br/>- Port 80/443: allow"]
F2B["fail2ban<br/>- SSH-Jail<br/>- maxretry: 20<br/>- bantime: 24h<br/>- findtime: 60s"]
Updates["Unattended-Upgrades<br/>- Automatische Sicherheitsupdates<br/>- Autoclean: 7 Tage"]
end
Internet["Eingehender Traffic"] --> UFW
UFW --> SSH
SSH --> F2B
Updates -.->|"Patches"| UFW
SSH-Konfiguration
Section titled “SSH-Konfiguration”| Einstellung | Wert |
|---|---|
PasswordAuthentication | no |
PermitRootLogin | prohibit-password |
PubkeyAuthentication | yes |
UFW-Regeln
Section titled “UFW-Regeln”| Port | Protokoll | Regel |
|---|---|---|
| 22 | TCP | limit (Rate-Limiting) |
| 80 | TCP | allow |
| 443 | TCP | allow |
Standardpolitik: deny incoming
fail2ban
Section titled “fail2ban”SSH-Jail-Konfiguration:
| Parameter | Wert |
|---|---|
maxretry | 20 |
findtime | 60s |
bantime | 86400s (24 Std.) |
Automatische Updates
Section titled “Automatische Updates”- Paketlisten: täglich aktualisiert
- Sicherheitsupdates: automatisch installiert
- Autoclean: alle 7 Tage
- Download: automatisch
Verwaltung
Section titled “Verwaltung”Alle Sicherheitseinstellungen werden über Ansible verwaltet (playbooks/hardening.yml):
# Nur Härtung anwendenjust provision --tags hardening
# Alle Einstellungen prüfenjust check