adrianlee_dev@lemmy.world 1 week ago
My server was recently compromised via the latest vulnerability. Fortunately, the damage wasn’t too severe. Since my server must remain publicly accessible, it can’t be hidden behind a VPN—I can only minimize its exposure as much as possible while ensuring my backup and recovery processes are rock-solid. I’ve configured the firewall to allow only essential ports, restricted SSH access to key-based authentication, enabled automatic installation of security updates, and set up daily backups, one of which is synchronized to an off-site location. Some have suggested treating public-facing machines as if they’ve already been compromised by default. I agree with this approach, and it’s exactly what I plan to do next.
Public-facing is the part that stays hard. Two things that helped on my own box: nothing listens on 0.0.0.0 unless it has to (admin UIs go behind WireGuard), and each service owns a separate data volume, so a compromise is one container rather than the whole disk. Neither stops a 0-day — they only decide how bad the morning is.