Articles on server security

A close look at the tools already running on your server: what they show, how to read their output and where people usually go wrong.

Login and access

4

A wildcard in sudoers almost always means root

Why a wildcard in a sudo rule is wider than it looks, how a literal in the middle of a command stops restricting anything, and what to replace such rules with. Worked through on a real vector via fail2ban.

Read

Turning SSH passwords off without losing access

Keys instead of passwords in ten minutes: how to test yourself before switching them off, why a file named 90-hardening.conf loses to the cloud one, and what to do about ssh.socket on Ubuntu 24.04.

Read

Network and firewall

6

A hotspot on the attack map: what to do about it on your own server

Ready-made rules instead of blocking a country: a jail for scanners probing other people’s admin panels, a rate limit, protection against banning yourself, and a properly scoped subnet block. With the commands to check your own logs, and with what must never be cut off so you keep your payments and your search indexing.

Read

UFW: rules that close nothing

Rule order, IPv6 slipping past the filter, Docker publishing ports around UFW, and why "status active" does not yet mean a port is closed.

Read

System hardening

4

Twelve server checks worth doing once a week

A server drifts on its own: packages queue up, a certificate creeps towards its expiry date, a jail quietly stops watching SSH. Here is what is worth looking at regularly, with the commands — and where the list ends up once doing it by hand gets old.

Read

Signs of a breach

7

Server health

6

Server load: load average, I/O wait and swap

Why a load average of 8 can be healthy and 2 can be an emergency, how a busy CPU differs from a disk the system is waiting on, and what it means when swap goes up once and never comes back down.

Read