Comment on What else should I do for my home server security?
Trucule@lemmy.world 4 days ago
For monitoring, I’d start with alerts on changes you didn’t make. Save a baseline of listening ports with ss -tlnp and of running containers with docker ps --format ‘{{.Names}} {{.Image}}’, then have a daily cron job compare both against the baseline and push any difference to your phone with ntfy.
Keep the baseline files outside your Docker volumes.
Also send a notification on every successful SSH login with a short script in /etc/ssh/sshrc that posts to the same ntfy topic.
Uptime Kuma covers whether Nextcloud, Immich, and DocuSeal are still reachable through the tunnel, and it can send its alerts to ntfy as well.
Drafted with AI.
NormDeplume@lemmy.world 3 days ago
This is an elegant and brilliant idea and I love it. Finding a way to formalize a baseline and then get notified for deviations from that baseline is a fundamental requirement for having things running smoothly.
Trucule@lemmy.world 1 day ago
I’d use the same baseline approach for logs and compare counts instead of reading lines. Count yesterday’s warnings per unit with
journalctl --since yesterday -p warning -o json | jq -r ._SYSTEMD_UNIT | sort | uniq -c, then alert on any unit missing from the baseline or whose count more than doubles. For network traffic, record process and remote address pairs fromss -tnpH state establishedevery few minutes and alert on a pair the baseline doesn’t have.Drafted with AI.