Maschinenraum/cp.uugrn.org
cp.uugrn.org
| URL |
AufbauCryptPad läuft als Benutzer /home/cryptpad/cryptpad Der öffentliche Zugriff erfolgt ausschließlich über nginx. CryptPad lauscht intern nur auf Loopback: [::1]:3000 [::1]:3003 Öffentlich erreichbar sind: 22/tcp SSH 80/tcp HTTP 443/tcp HTTPS Dienstesystemctl status cryptpad systemctl status nginx systemctl status ssh systemctl status nftables systemctl status fail2ban CryptPad neu starten: systemctl restart cryptpad nginx-Konfiguration prüfen und neu laden: nginx -t systemctl reload nginx CryptPad-Logs: journalctl -u cryptpad SSHAdministrativer Benutzer: adminBenutzer Anmeldung: ssh -4 -i ~/.ssh/ssh-rsa-private-4096-key adminBenutzer@cp.uugrn.org Root-Rechte: sudo -i SSH ist gehärtet: PermitRootLogin no PasswordAuthentication no KbdInteractiveAuthentication no PubkeyAuthentication yes AllowGroups sshusers LoginGraceTime 30 MaxAuthTries 3 MaxStartups 10:30:30 PerSourceMaxStartups 3 Prüfung: sshd -t sshd -T Firewallnftables-Konfiguration: /etc/nftables.conf Regeln anzeigen: nft list ruleset Eingehend erlaubt: 22/tcp 80/tcp 443/tcp ICMP ICMPv6 DHCPv4 Loopback established/related Standard: INPUT DROP FORWARD DROP OUTPUT ACCEPT Fail2banKonfiguration: /etc/fail2ban/jail.d/sshd.local SSH-Jail: maxretry = 4 findtime = 10m bantime = 1h backend = systemd usedns = no Status: fail2ban-client status sshd nftables enthält zusätzlich die von Fail2ban verwaltete Tabelle: table inet f2b-table Nach einem manuellen Neustart von nftables auch Fail2ban neu starten: systemctl restart nftables systemctl restart fail2ban UpdatesDebian-Sicherheitsupdates werden automatisch über Nicht automatisch aktualisiert werden:
Automatische Neustarts sind deaktiviert. Updates prüfen: apt update apt list --upgradable Automatische Security-Updates testen: unattended-upgrade --dry-run Neustartbedarf prüfen: test -f /var/run/reboot-required && cat /var/run/reboot-required CryptPad-DatenWichtige persistente Daten: /home/cryptpad/cryptpad/data /home/cryptpad/cryptpad/datastore /home/cryptpad/cryptpad/block /home/cryptpad/cryptpad/blob /home/cryptpad/cryptpad/config/config.js /home/cryptpad/cryptpad/customize BackupBackup-Skript: /root/sichercp Backups: /root/backups Aufbewahrung: 180 Tage Aktuelle Backupgröße: etwa 133 MB. Gesichert werden:
Nicht gesichert werden reproduzierbare Daten: .git node_modules www www/common/onlyoffice/dist Backup starten: /root/sichercp Backups anzeigen: ls -lh /root/backups Das Backup liegt derzeit nur lokal auf dem Server. Ein zusätzliches externes Backup sollte eingerichtet werden, sobald ein geeignetes Ziel verfügbar ist. RestoreBackup testweise entpacken: BACKUP=$(ls -1t /root/backups/cp-backup-*.tar.gz | head -1) mkdir -p /root/restore-test tar \ --acls \ --xattrs \ --numeric-owner \ -C /root/restore-test \ -xzf "$BACKUP" Danach Daten und Konfiguration prüfen und das Testverzeichnis wieder entfernen: rm -rf /root/restore-test Bei einem vollständigen Serverausfall:
CryptPad-UpdateVor jedem Update:
Update als Benutzer su - cryptpad cd /home/cryptpad/cryptpad git fetch --tags git checkout VERSION npm ci npm run install:components ./install-onlyoffice.sh Anschließend als root: systemctl start cryptpad systemctl status cryptpad Danach prüfen: https://cp.uugrn.org/checkup/ Zusätzlich Anmeldung, Pads, Datei-Upload und OnlyOffice testen. Regelmäßige Kontrollesystemctl --failed systemctl status cryptpad nginx ssh nftables fail2ban nft list ruleset fail2ban-client status sshd apt list --upgradable df -h journalctl -p warning..alert --since today |
|---|