This site's home server, reviewed and hardened
I host this site on an Ubuntu server assembled from spare parts. I checked its configuration, fixed the SSH and monitoring setup, and added web-server and DNS protections.
Results
ASSL Labs grade
53,175Suricata rules loaded
8security headers on every HTTPS page
The problem
SSH accepted passwords, fail2ban watched the wrong port and Suricata had no rules. PHP and Apache were still installed, and unknown hostnames or bare-IP requests got the site without security headers. DNS had no DNSSEC, CAA or DMARC policies.
What I did
- Key-only SSH for a single admin account, reachable only from the home network, with an unused older account locked.
- Security headers in nginx with a strict content policy, a catch-all that drops unknown hosts and bare-IP requests, per-client rate limits and short timeouts.
- Fixed fail2ban so it watches the real SSH port and web bot probes, and loaded Suricata's ruleset with a weekly refresh.
- Removed PHP and Apache, which a static site never needed, and archived the previous site before removing it.
- DNSSEC, a CAA record limiting which authority can issue certificates, and a DMARC policy against spoofed mail from the domain.
What I took from it
A login test showed that SSH still accepted passwords even though the file I had checked said key-only. A cloud-init file loaded first. I corrected the effective configuration and tested the login again.