Advanced Search
Search Results
92 total results found
Installation auf Hetzner
Auf Hetzner-Server: ssh hetzner # Wireguard installieren apt install -y wireguard # Keys generieren cd /etc/wireguard umask 077 wg genkey | tee hetzner-private.key | wg pubkey > hetzner-public.key # Keys anzeigen und notieren! cat hetzner-privat...
Installation auf Homeserver
Auf Homeserver: # Wireguard installieren sudo apt update sudo apt install -y wireguard # Keys generieren sudo -i cd /etc/wireguard umask 077 wg genkey | tee homeserver-private.key | wg pubkey > homeserver-public.key # Keys anzeigen und notieren! ...
Tunnel setzen
Von Hetzner zum Homeserver: # Auf Hetzner ping -c 4 10.100.0.2 Von Homeserver auf Hetzner: # Auf Homeserver ping -c 4 10.100.0.1 -> Beide sollten Antworten Status prüfen wg show Troubleshooting # Wireguard neu starten sudo systemctl restart wg-quick@wg...
Caddy Reverse Proxy
Was ist Caddy?
Caddy ist ein moderner Webserver und Reverse Proxy. Features: automatische SSL Zertifikate (Let's Encrypt) Einfache Konfiguration HTTP/2 & HTTP/3 Support Reverse Proxy funktionalität In meinem Setup Caddy auf Hetzner: Öffentlicher Eingang, SSL-Termination C...
Caddy auf Hetzner
Installation: ssh hetzner apt install -y debian-keyring debian-archive-keyring apt-transport-https curl curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https...
Caddy auf Homeserver
Caddyfile sudo nano /etc/caddy/Caddyfile Inhalt: enode.eu { basicauth { denode $2a$14$<BCRYPT_HASH> } root * /var/www/denode file_server encode gzip } nextcloud.denode.eu { encode gzip reverse_proxy 10.100.0.2:80 { ...
Wichtige Caddy-Befehle
Config testen caddy validate --config /etc/caddy/Caddyfile Caddy neuladen sytemctl reload caddy Status prüfen systemctl status caddy Logs ansehen journalctl -u caddy -f Config Pfad: Hetzner: /etc/caddy/Caddyfile Homeserver: /etc/caddy/Caddyfile
Security Guide
Firewall
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 a...
UFW auf Homeserver
Regeln: sudo ufw default deny incoming sudo ufw default allow outgoing # Tailscale erlauben sudo ufw allow in on tailscale0 # Wireguard erlauben sudo ufw allow in on wg0 # SSH nur über Tailscale sudo ufw allow from 100.0.0.0/8 to any port 22 proto...
SSH Hardening
Key-Only Login
SSH-Config nano /etc/ssh/sshd_config Wichtige Einstellungen PasswordAuthentication no ChallengeResponseAuthentication no UsePAM no PermitRootLogin prohibit-password PermitEmptyPasswords no Protocol 2 LoginGraceTime 60 MaxAuthTries 3 X11Forwarding no SSH neus...
SSH Custom Port
Port ändern: nano /etc/ssh/sshd_config Ändere: Port 1234 UFW anpassen: ufw allow 1234/tcp ufw delete 22/tcp ufw reload SSH reload systemctl reload sshd Lokale SSH Config anpassen: nano /.ssh/config Host Hetzner Hostname 1.2.3.4 User root IdentityFil...
Fail2Ban
Installation und Config
Auf Hetzner: apt install -y fail2ban nano /etc/fail2ban/jail.local Inhalt: [DEFAULT] bantime = 3600 findtime = 600 maxretry = 5 ignoreip = 127.0.0.1/8 ::1 action = %(action_)s telegram destemail = root@localhost sendername = Fail2Ban mta = mail [s...
Wichtige Befehle
Status: fail2ban-client status fail2ban-cleint status sshd Gebannte IP's: fail2ban-client get sshd banned IP bannen/entbannen fail2ban-client set shhd banip 1.2.3.4 fail2ban-clien set shhd unbanip 1.2.3.4 Logs: tail -f /var/log/fail2ban.log