Posts about linux
7 posts
-
Automatic security updates on Debian and Ubuntu with unattended-upgrades
How I set up unattended-upgrades on Debian and Ubuntu servers: security-only origins, a controlled reboot window, a dry run, and logs worth checking.
-
Why Docker published ports bypass UFW, and how to lock them down
Docker writes its own iptables rules, so ufw deny does not stop traffic to published container ports. Bind to localhost or filter in the DOCKER-USER chain instead.
-
Hardening SSH on a Linux server: keys only, no root, a safe rollout
Switch a Linux server to key-only SSH, disable root login and limit who can connect, using an sshd_config.d drop-in, sshd -t and sshd -T, without locking yourself out.
-
Hardening a Docker container at runtime: read-only, no root, fewer capabilities
Run containers with a read-only root filesystem, a non-root user, dropped Linux capabilities and no-new-privileges, using docker run flags and Compose.
-
Replacing cron jobs with systemd timers on Linux
How to turn a cron job into a systemd service and timer pair, with logging in the journal, missed-run catch-up, randomized delays and easy status checks.
-
A minimal host firewall with nftables
How I write a small default-deny nftables ruleset for a Linux server: allow SSH and web traffic, keep established connections, and avoid locking myself out.
-
Server backups you can actually restore: a practical restic setup
How I back up Linux servers with restic: an encrypted repository, a sensible retention policy, a systemd timer, and the restore drills that prove it works.