Posts about linux

7 posts

  1. 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.

    3 min read

  2. 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.

    3 min read

  3. 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.

    4 min read

  4. 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.

    3 min read

  5. 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.

    3 min read

  6. 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.

    3 min read

  7. 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.

    3 min read