Checklist: hardening a server

These are the points we reviewed on our own servers in autumn 2026, and the faults we found on the way. Use it as a checklist for your own server, or let us go through it for you.

Last checked:

Step by stepThe checklist in our order
  1. Open ports from outside
  2. Docker past the firewall
  3. Databases
  4. SSH and keys
  5. Control panel
  6. TLS and headers
  7. Prove the change

How we audited

We run 12 Linux servers, all reached by SSH keys only. The audit used a read-only tool that changes nothing: open ports, firewall, what Docker exposes, control panel exposure, database logins, keys, secrets on disk, kernels and backup jobs. Ports were checked from outside, from four independent locations against 44 targets.

What you see from outside is what an attacker sees. What you see from inside explains why it is open.

The checklist in our order

Start from outside. Whatever the internet can reach is the most urgent.

  1. Open ports from outside Scan the server from another network, not from the server itself. Everything that answers needs a reason.
  2. Docker past the firewall Docker can publish container ports around the host firewall. Check them separately.
  3. Databases They must not listen on every network or be allowed from anywhere. Also check that logins need a password.
  4. SSH and keys Keys only, no passwords. Remove keys nobody can explain.
  5. Control panel Close panel access from outside, and switch off the panel API if it is not used.
  6. TLS and headers Modern TLS only, security headers on every site, and status pages closed to the outside.
  7. Prove the change A change is done only when you have seen it work.

Databases and Docker

The typical finding is two things together: a firewall rule that allows everything, and a database listening on every network. Each looks harmless on its own. Together, the database is open to the whole internet. Where that happens, the attempts follow: on one server the log showed 2,113 distinct addresses trying passwords. We now have a check that alerts on exactly that combination, “listens publicly and is allowed from anywhere”.

Docker is a classic blind spot. It opens container ports past the host firewall, so a tool like ufw does not show them. We close them in Docker’s own chain (DOCKER-USER).

PostgreSQL was set to trust local connections without a password on five servers. Anyone who gets a foothold through a vulnerable website then gets full database access. We switched to encrypted logins (scram) and system logins (peer), turned on connection logging, and added a check for weak database access.

TLS, headers and status pages

  • Security headers on every site: HSTS, nosniff, X-Frame-Options and Referrer-Policy.
  • TLS 1.1 removed from 18 virtual hosts. Mail uses TLS 1.2 or newer.
  • The PHP-FPM status page closed to the outside on all 11 servers. It shows internal information nobody outside needs.

Passwords and keys

Old and unknown root keys were removed from 12 servers in steps: first a count, then one server as a pilot, then four, then seven. After each step we checked that logins still worked. It is slower than clearing everything at once, but nobody got locked out.

A lesson about passwords: the control panel’s “change database password” did nothing at all on newer MariaDB versions, with no error. We now change passwords directly in the database and check afterwards that the new one works and the old one does not. The general rule: every change has a backup first, a check afterwards and a written way back.

Ask your provider

  • When was the server last scanned from outside, and what was open?
  • Can the database be reached from the internet? How was that checked?
  • Is Docker on the server, and who has checked its ports?
  • Who holds SSH keys, and when was the list last reviewed?
  • Which TLS versions does the server accept?
  • How do you know a password change actually took effect?

The website on its own: this checklist is about the server. To see what your website shows to the outside world, such as headers and TLS, use the free website security check.

Questions about hardening

How long does a review take?

For one server the review itself is short, because the tool only reads. The time goes into closing the findings safely, one at a time, with a check after each.

Can hardening break something?

Yes, if it is done blindly. That is why we pilot on one server, test, and keep a way back before the rest follow.

Does this apply to shared web hosting too?

Only partly. On shared hosting (a “webhotel” in Danish) the provider runs the server. You can still check access, passwords, CMS updates and your site’s headers.

Fixed price, no commitment

Get your server reviewed

Tell us which server it is and who runs it today. You get a plan for the review and a fixed price before we start.

  • A fixed price before we start
  • An answer by e-mail, no calls
  • Your details are used only to answer you

Fields marked with * are required.

What is it about?