LC Notes

Setting up a clean Debian 12 server

Start from a fresh install, check the time and the listening ports, and add a small swap file if the machine only has 1 or 2 GB of memory. Update the system before changing anything else.

Move SSH to a non-standard port, keep password login only if you need it, and lock the firewall down to SSH, HTTP and HTTPS. Add fail2ban for SSH so repeated login attempts get blocked.

Write down each step and its check output. A clean rebuild is much easier when you can see what the last good state looked like.