System Configuration Hardening
What you'll learn: How to enforce security policies by modifying kernel parameters, sysctl settings, and system configuration files to reduce attack surface at the operating system level.
The Core Idea
Once you've disabled unnecessary services and removed unneeded software, the next layer of OS hardening involves configuring what remains. System configuration hardening means adjusting low-level operating system settings—particularly kernel parameters and system-wide defaults—to enforce security policies like preventing IP spoofing, restricting core dumps, or limiting network behavior.
Think of it like tuning a car's engine control unit: the engine (OS kernel) runs regardless, but you can adjust parameters to make it perform more safely for your specific use case.
Key Configuration Areas
Kernel parameters via sysctl control runtime kernel behavior. Examples include:
net.ipv4.conf.all.rp_filter=1– enables reverse path filtering to prevent IP spoofingkernel.dmesg_restrict=1– restricts access to kernel logsfs.suid_dumpable=0– prevents setuid programs from creating core dumps (which could leak sensitive data)
System configuration files like /etc/login.defs, /etc/security/limits.conf, and service-specific configs enforce user behavior, resource limits, and authentication policies.
Applying changes:
- Temporary:
sysctl -w parameter=value - Persistent: Add to
/etc/sysctl.confor/etc/sysctl.d/
Why It Matters
These settings create security guardrails that survive reboots and apply system-wide. They're especially powerful because they operate at the kernel level—below most applications—making them harder to bypass. Combined with service disabling and software removal, configuration hardening creates defense-in-depth.
Key Takeaway: System configuration hardening modifies kernel and OS-level settings to enforce security policies from the foundation up, complementing service reduction with behavioral restrictions that apply across the entire system.