Best Practices for Enterprise Linux Server Hardening

Hardening a Linux server is a short list of settings you can explain, applied the same way on every host. A benchmark such as CIS is a useful catalogue. It is not, by itself, evidence that a particular estate meets it. MMConsultancy does not claim a certification on your behalf.

Access

  • SSH keys for people, and a separate break-glass path that is logged and rarely used.
  • No direct root login over SSH. Administrators use sudo with a command policy that matches the work, not a blanket ALL if you can avoid it.
  • Accounts removed when the person or the vendor engagement ends. A local user named after a contractor from two years ago is a common finding.

The controls that are already on the system

SELinux on Red Hat Enterprise Linux should stay enforcing. Switching it to permissive because an application failed is a temporary diagnosis, not a configuration. Fix the policy or the file labels, then turn enforcing back on. firewalld, or the cloud security group in front of the host, should allow only the ports the service needs. A host with both a wide-open security group and a wide-open firewall has two unused controls.

Packages, time, and logs

Unpatched packages undo the rest of the baseline. Tie hardening to the same patch cycle as the rest of the fleet. chrony should keep time, because your logs are useless for an incident if the clocks disagree. journald, and any central log store you already run, should receive authentication events. auditd is worth enabling when you have someone who will look at the records.

Encode it

A baseline that lives in a wiki will drift. Put the settings in Chef or Ansible and let a second run show whether a host has been edited by hand. That is the hardening practice that lasts.

Ask for a hardening pass against the baseline you want, not against a logo we do not hold.