Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Linux Hardening

Direct answer

Linux Hardening applies role-specific secure configuration across boot/kernel, packages/services, identities, sudo/PAM/SSH, filesystems, LSMs, capabilities/seccomp, firewalling, auditing, patching, secrets and recovery with continuous drift control.

When to use this

Use it when configuring, checking or troubleshooting Linux Hardening in Linux Security.

First 30 seconds

1. Linux hardening: minimal packages, SSH, sudo, PAM, MAC, firewall, auditd, sysctls, file permissions, updates.

2. Automate with config management.

3. Measure with OpenSCAP/CIS.

4. Document exceptions.

5. Re-scan regularly.

Operational verification

baseline → configuration management → scan

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

A hardening check shows selected configuration at a time, but it does not show effective enforcement, absence of compromise or acceptable residual risk.

Suspicious evidence: wrong distribution guidance, config file not loaded, permissive LSM, broad sudo/capabilities, firewall manager conflict, patch/reboot gap, audit blind spot or recovery broken.

Platform / version applicability
Platform and workload security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformPlatform and workload security
Scope / prerequisiteUse it when configuring, checking or troubleshooting Linux Hardening in Linux Security.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

host role/risk → distribution-specific baseline → configuration deployment → loaded boot/kernel/service/security state → workload verification → audit/drift → remediation/update/recovery

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Linux hardening ≠ blindly applying one distribution-agnostic checklist.
  • Compliance scan ≠ loaded runtime control or secure workload outcome.
  • Configuration file present ≠ parsed, loaded and effective runtime state.
  • One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.
Key checks
  • CIS benchmark scan (OpenSCAP) — compliance
  • oscap xccdf eval --profile <profile> --report report.html <ds.xml> — SCAP scan
  • lynis audit system — quick audit
ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

A hardening check shows selected configuration at a time, but it does not show effective enforcement, absence of compromise or acceptable residual risk.

In depth

Linux hardening secures servers by reducing attack surface and enforcing secure configuration.

AreaMeasures
AccountsNo direct root login; sudo with named accounts; key-based SSH
SSHPermitRootLogin no, PasswordAuthentication no, restricted users/groups, MFA for admins
PackagesMinimal install; automatic security updates
ServicesDisable unneeded services; listen only where needed
FirewallDefault deny inbound (nftables, firewalld, ufw)
MACSELinux enforcing / AppArmor profiles
Loggingjournald/rsyslog forwarding, auditd rules
Filesystemsnodev,nosuid,noexec on /tmp and similar
IntegrityAIDE file integrity monitoring

Automate with Ansible roles based on CIS Benchmarks or DISA STIGs and verify with OpenSCAP or Lynis.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docPlatform and workload security current

Authoritative/upstream documentation reviewed for bounded claims in Linux Security → Linux Hardening. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/security/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
Linux system hardeningLinux secure configurationserver hardening Linux
Embedded reference data

Quick lookup tables

Linux Security → Linux Hardening proof map

Fast scope, effective-state, runtime-evidence and closure boundaries for Linux Security → Linux Hardening.

BoundaryEstablishDoes not establish
ScopeExact host, role, build/kernel, identity, workload and expected controlDoes not prove policy receipt or effective runtime state
Effective stateResultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controlsConfiguration presence does not prove enforcement
Runtime evidenceCorrelated events/audit, process/token/credential, packet/syscall and workload resultOne event, clean status or allow/deny does not prove complete security
ClosureOriginal allowed/denied workload works, unsafe state is removed and recovery/regression passCommit, restart, block or compliance result alone is not closure
Confirmation

Confirm action

Continue?