Patching
Unpatched systems are a common way in for attackers. On a lab machine you can rebuild, the risk of an automatic update breaking something is usually smaller than the risk of skipping patches. Stagger your updates, so your hosts aren’t all busy at once, and so one bad update doesn’t take everything out.
- Debian and Ubuntu: turn on unattended-upgrades.
- Fedora and RHEL-family systems: use dnf-automatic.
- Many machines: run an Ansible playbook on a schedule, one group at a time, so you can reboot in a controlled way.
- Central management: Uyuni (the successor to Spacewalk) and Foreman with Katello manage patching, inventory and provisioning. They’re worthwhile if you want to learn those tools, but they’re overkill for a few VMs.
Remember that kernel updates need a reboot to take effect. Check with needrestart on Debian-based systems or dnf needs-restarting on RHEL-based ones.
Don’t build anything new on CentOS Linux, as both 7 and 8 have reached end of life. Use AlmaLinux, Rocky Linux, CentOS Stream, Debian or Ubuntu LTS instead.
Windows
Section titled “Windows”- Standalone or a few machines: configure Windows Update settings with Group Policy or local policy.
- WSUS: Microsoft deprecated WSUS in 2024. It’s still included in Windows Server and still works, but it isn’t getting new features. It’s fine to learn since many businesses still use it. Don’t build a long-term plan around it.
- Microsoft’s modern approach: Azure Update Manager and Windows Autopatch are cloud-based and may have licensing or usage costs.
Containers
Section titled “Containers”Rebuilding with a newer image is the way to patch a container. Don’t update them in place.
- Renovate opens pull requests when new image versions are available, so you can review them first. It works very well if you keep your Compose files in Git.
- Diun notifies you of new images without changing anything.
- Auto-updaters that pull
latestare convenient, but they can apply a breaking change while you’re away. Use them only for services you can afford to have break.
Hypervisors, firmware and appliances
Section titled “Hypervisors, firmware and appliances”- Hypervisors: a reboot affects every VM, so choose a time. In a cluster, migrate VMs and do one node at a time. Read the release notes first, and be careful with major version upgrades.
- Firmware: BIOS, BMC and SSD updates fix real security and stability problems. Check at least a couple of times a year.
- Network gear and NAS devices: these are easy to forget, and they’re among the most exposed devices you own. Turn on update notifications.
- Unsupported hardware: when a device stops getting updates, replace it, or isolate it on a restricted network.