Overview
A practical checklist for locking down Ubuntu and Debian servers, in the order that gives the most protection first.
Each step shows the command or config change, how to verify it, and how to undo it if something breaks.
Key highlights
What's inside
Accounts & sudo
Users, groups, sudo policy and password rules.
SSH
Key-only login, disabling root, and safe settings.
Firewall
Default-deny rules with ufw or nftables.
Logging
auditd rules and log retention.
Brute-force protection
fail2ban jails for SSH and web services.
Updates & services
Automatic security updates and removing what you don't need.
Tools & technologies
Is this for you?
Who it's for
Anyone running a Linux server — from a home lab to production.
Before you start
Comfortable with the Linux command line.
