Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| computer:neuaufbau_hermes [2022/01/17 11:20] – [Backup vom Backup] springm | computer:neuaufbau_hermes [2025/05/03 13:49] (current) – [8TB-Backupdisk hinzufügen] spring | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| * | * | ||
| - | ===== 8TB-Backupdisk hinzufügen ===== | + | ===== xxTB-Backupdisk hinzufügen ===== |
| + | Mount backupdisk either through block device or uuid | ||
| + | |||
| + | ==== Obsolete: encrypted Backupdisk ==== | ||
| + | Not necessary as restic backups are already encrypted | ||
| siehe auch https:// | siehe auch https:// | ||
| sudo dd if=/ | sudo dd if=/ | ||
| Line 31: | Line 35: | ||
| update‐initramfs ‐u | update‐initramfs ‐u | ||
| | | ||
| - | Entsperren mit '' | + | Entsperren mit '' |
| - | ==== Ubuntu-Cloud-Init entfernen ==== | + | ===== Ubuntu-Cloud-Init entfernen |
| - | === Prevent start === | + | ==== Prevent start ==== |
| Create an empty file to prevent the service from starting | Create an empty file to prevent the service from starting | ||
| Line 40: | Line 44: | ||
| sudo touch / | sudo touch / | ||
| - | === Uninstall === | + | ==== Uninstall |
| Disable all services (uncheck everything except " | Disable all services (uncheck everything except " | ||
| Line 50: | Line 54: | ||
| sudo rm -rf /etc/cloud/ && sudo rm -rf / | sudo rm -rf /etc/cloud/ && sudo rm -rf / | ||
| - | ==== Docker-Compose ==== | + | ===== Docker-Compose |
| | | ||
| apt update && apt upgrade && apt install docker.io | apt update && apt upgrade && apt install docker.io | ||
| Line 63: | Line 67: | ||
| docker-compose -v | docker-compose -v | ||
| - | ==== Rsnapshot ==== | + | ===== Rsnapshot |
| from https:// | from https:// | ||
| + | * container enthält cron! | ||
| * Backup-Platte gemounted auf /backupdisk | * Backup-Platte gemounted auf /backupdisk | ||
| * Benötigte Pakete '' | * Benötigte Pakete '' | ||
| Line 73: | Line 78: | ||
| * (rsnapshot-diffs könnten regelmäßig abgelegt werden.) | * (rsnapshot-diffs könnten regelmäßig abgelegt werden.) | ||
| + | ==== Statisches rsync 3.1.3 ==== | ||
| + | Der alpine-basierte rsnapshot-docker-container verwendet aktuell rsync 3.2.4, das mit rsync 3.1.3 auf allen Ubuntu-Rechnern inkompatibel ist. | ||
| + | |||
| + | Lösung: statisches rsync 3.1.3 kompiliert, im Docker-Container als / | ||
| + | |||
| + | Nach Upgrade auf Ubuntu 22 muss dies vermutlich rückgängig gemacht werden. | ||
| + | |||
| + | docker run --rm -it alpine sh | ||
| + | |||
| + | apk add --update alpine-sdk | ||
| + | apk add perl | ||
| + | apk add libpopt-dev | ||
| + | apk add libpopt | ||
| + | apk add popt | ||
| + | apk add popt-dev | ||
| + | apk add zlib-dev | ||
| + | apk add gnu-make | ||
| + | apk add git build-base cmake file-dev | ||
| + | | ||
| + | CC=" | ||
| + | export CC | ||
| + | ./configure --disable-locale | ||
| + | echo '# | ||
| + | make | ||
| + | exit | ||
| + | |||
| + | docker cp pedantic_ardinghelli:/ | ||
| + | scp rsync hermes: | ||
| - | ==== Traefik2 ==== | + | ===== Traefik2 |
| Alle Docker-Server-Daten sind in /srv. Docker-Konfiguration ist in ~springm/ | Alle Docker-Server-Daten sind in /srv. Docker-Konfiguration ist in ~springm/ | ||
| - | |||
| - | Domain iris.aberdoch.de und CNAME *.iris sind bei cloudflare registriert. Achtung: iris.aberdoch.de darf im pihole keinen Eintrag haben, da sonst die Zertifikatsgenerierung mit letsencrypt nicht mehr funktioniert. | ||
| cd docker | cd docker | ||
| Line 84: | Line 115: | ||
| sudo chmod 0600 acme.json | sudo chmod 0600 acme.json | ||
| - | ==== Backup vom Backup ==== | + | {{: |
| + | |||
| + | https:// | ||
| + | |||
| + | ===== Backup vom Backup | ||
| cryptsetup luksErase /dev/sdc1 | cryptsetup luksErase /dev/sdc1 | ||
| Line 96: | Line 131: | ||
| cryptsetup luksOpen /dev/sdc1 enc-backupCopy1 --key-file=/ | cryptsetup luksOpen /dev/sdc1 enc-backupCopy1 --key-file=/ | ||
| - | ==== NFS-Server ==== | + | ===== NFS-Server |
| ( https:// | ( https:// | ||
| / | / | ||
| + | | ||
| + | ===== fetchmail ===== | ||
| + | Neben der / | ||
| + | |||
| + | ===== PDF-Druckserver ===== | ||
| + | https:// | ||
| + | ===== fail2ban ===== | ||
| + | sudo apt install sqlite3 | ||
| + | sudo apt install fail2ban ipset | ||
| + | |||
| + | enablen und starten: | ||
| + | systemctl enable fail2ban | ||
| + | systemctl start fail2ban | ||
| + | | ||
| + | Nach https:// | ||
| + | ''/ | ||
| + | # Fail2Ban configuration file | ||
| + | # | ||
| + | # Author: Cyril Jaquier | ||
| + | # Modified: Yaroslav O. Halchenko < | ||
| + | # made active on all ports from original iptables.conf | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | [INCLUDES] | ||
| + | |||
| + | before = iptables-common.conf | ||
| + | |||
| + | |||
| + | [Definition] | ||
| + | |||
| + | # Option: | ||
| + | # Notes.: | ||
| + | # Values: | ||
| + | # | ||
| + | actionstart = ipset create f2b-< | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | | ||
| + | # Option: | ||
| + | # Notes.: | ||
| + | # Values: | ||
| + | # | ||
| + | actionflush = ipset flush f2b-< | ||
| + | |||
| + | # Option: | ||
| + | # Notes.: | ||
| + | # Values: | ||
| + | # | ||
| + | actionstop = < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | ipset destroy f2b-< | ||
| + | | ||
| + | | ||
| + | # Option: | ||
| + | # Notes.: | ||
| + | # Values: | ||
| + | # | ||
| + | # actioncheck = < | ||
| + | |||
| + | # Option: | ||
| + | # Notes.: | ||
| + | # command is executed with Fail2Ban user rights. | ||
| + | # Tags: See jail.conf(5) man page | ||
| + | # Values: | ||
| + | # | ||
| + | actionban = / | ||
| + | |||
| + | # Option: | ||
| + | # Notes.: | ||
| + | # command is executed with Fail2Ban user rights. | ||
| + | # Tags: See jail.conf(5) man page | ||
| + | # Values: | ||
| + | # | ||
| + | actionunban = / | ||
| + | |||
| + | [Init] | ||
| + | und ''/ | ||
| + | #!/bin/bash | ||
| + | | ||
| + | ipsetcommand=" | ||
| + | ipsetname=" | ||
| + | IP=" | ||
| + | |||
| + | if [[ " | ||
| + | / | ||
| + | else | ||
| + | / | ||
| + | fi | ||
| + | |||
| + | Konfiguration für dokuwiki in '''/ | ||
| + | [nginx-403] | ||
| + | | ||
| + | enabled | ||
| + | port = http,https | ||
| + | filter | ||
| + | logpath | ||
| + | maxretry | ||
| + | findtime | ||
| + | bantime | ||
| + | banaction = iptables-mangle-allports[name=" | ||
| + | |||
| + | und '''/ | ||
| + | [Definition] | ||
| + | failregex = ^< | ||
| + | ignoreregex = | ||
| + | | ||
| + | Das Logging in dokuwiki muss so geändert sein, dass die echte IP und nicht die von traefik geloggt wird. | ||
| + | |||