How do you scan a host for compliance with OpenSCAP?
AdvancedProductionFirewalls, MAC & Compliance
Answer
sudo dnf install openscap-scanner scap-security-guide
oscap info /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml # list profiles
sudo oscap xccdf eval \
--profile xccdf_org.ssgproject.content_profile_cis_server_l1 \
--results results.xml --report report.html \
/usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
The HTML report shows pass/fail per rule with remediation; oscap xccdf generate fix --fix-type ansible produces a playbook. Run it in CI against golden images.
More on Firewalls, MAC & Compliance
How do ufw, firewalld, nftables and iptables relate?BeginnerConfigure ufw for a web server with SSH only from the office.BeginnerExplain firewalld zones and runtime vs permanent configuration.IntermediateWrite a minimal nftables ruleset for a server.AdvancedWhy are nftables preferred over iptables at scale?AdvancedHow do you avoid locking yourself out when changing remote firewall rules?Intermediate