Linux Security Hardening
Linux security hardening is the process of reducing a Linux system's exposed attack surface and enforcing the access, update, logging, and recovery controls its real workload needs.
itLinux | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Intro
Linux Security Hardening
Linux security hardening is a disciplined way to reduce the ways a system can be attacked and to make security-relevant behavior visible. It is not a list of settings to paste into every host. A database server, build runner, laptop, and Kubernetes node have different jobs, trust boundaries, and failure costs.
Start with the system's intended function. Identify who administers it, which network paths it needs, which services it runs, what data it stores, and how it is recovered. Then remove or restrict what does not serve that function. NIST describes server security as selecting, implementing, and maintaining controls. That maintenance part matters: a hardened image drifts as packages, services, accounts, and operational needs change.
The mental model
Think in layers. Each layer limits a different part of the problem.
- Lifecycle — use a supported distribution, apply updates, and retire systems that no longer receive security fixes.
- Exposure — install and enable only required services. Restrict listening ports and administrative paths.
- Identity — give people and automation distinct accounts, strong authentication, and the smallest useful administrative authority.
- Execution — constrain what services and users can execute. Keep mandatory access control active where the distribution provides it.
- Data — control file ownership, permissions, secrets, encryption, and backup access.
- Detection and recovery — collect useful logs, monitor changes, test restores, and preserve an incident path.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://csrc.nist.gov/pubs/sp/800/123/final
Supports
- Server-security control selection, implementation, maintenance, and lifecycle framing
- Access control, audit, configuration management, identification, authentication, maintenance, planning, and system protection as server-security control families
- https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html-single/security_hardening/index
Supports
- System-wide cryptographic policy coverage and explicit override model
- SCAP Security Guide content, profiles, rules, remediation data, and compliance-scan limitation
- Application allowlisting and permissive-to-enforcing rollout example
- https://docs.kernel.org/admin-guide/sysctl/index.html
Supports
- Sysctl as a run-time kernel configuration interface through `/proc/sys/`
- Kernel subsystems exposed through sysctl documentation
- https://docs.kernel.org/security/self-protection.html
Supports
- Kernel self-protection purpose, threat framing, and attack-surface reduction
- https://static.open-scap.org/openscap-1.4.1/oscap_user_manual.html
Supports
- OpenSCAP assessment using a scanner and SCAP content
- SCAP specifications, profiles, and common OpenSCAP operations
- Distribution package examples and remote assessment behavior
- https://www.ssgproject.org/
Supports
- Maintained security-policy content for automated configuration assessment
- https://github.com/decalage2/awesome-security-hardening
Supports
- Discovery of Lynis, OpenSCAP, and Fail2Ban as relevant hardening ecosystem tools
- https://cisofy.com/lynis/
Supports
- Lynis as an auditing tool for Linux and Unix system hardening
- https://www.open-scap.org/
Supports
- OpenSCAP project and toolset destination
- https://www.fail2ban.org/
Supports
- Fail2Ban project destination for log-based response tooling
