Your CISO asks you to harden a fresh Linux server baseline. What's on your list?
IntermediateScenarioSecurity, hardening and incident response
Answer
Situation read → Follow a benchmark and automate it.
What I'd do →
- Patch and enable automatic security updates.
- SSH: keys only, no root, allowlisted groups.
- Remove unneeded packages and services (
systemctl list-unit-files --state=enabled). - Host firewall default-deny inbound.
- SELinux/AppArmor enforcing.
- auditd plus log forwarding; time sync with chrony.
- Mount options (
nodev,nosuid,noexecon/tmp), sysctl hardening. - Scan with OpenSCAP:
oscap xccdf eval --profile cis --report report.html /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml.
Why → CIS gives an auditable standard; OpenSCAP proves compliance.
Interview tip → Say you bake the hardened baseline into the golden image, not apply it by hand.
More on Security, hardening and incident response
Monitoring shows a web server making outbound connections to an unknown IP on port 4444 at 2 AM. You suspect it is compromised. What do you do?AdvancedAfter the compromise you need to find how the attacker got in. Where do you look?AdvancedA developer says "SELinux keeps breaking my app, can we just disable it?" How do you respond and what do you do?IntermediateYou need to know when anyone modifies `/etc/sudoers`, `/etc/passwd` or SSH config. How?IntermediateA critical OpenSSL CVE is announced. How do you find and patch affected servers quickly?IntermediateHow do you make sure only signed, approved packages can be installed on your servers?Intermediate