Linux distributions
TMA-ROCKY9-4.1.2
Ensure firewalld backend is configured
MediumLevel 1Automatedlinux
Description
The FirewallBackend option selects the firewall backend implementation. Choices are: • nftables (default) • iptables (iptables, ip6tables, ebtables and ipset)
How it is checked
Audit method: Shell command
shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep -Pi -- '"'"'^\h*FirewallBackend\h*=\h*iptables\b'"'"' /etc/firewalld/firewalld.conf' 2>/dev/null); [ -z "$o" ] || { echo "step1: $o" | head -c 300; return 1; }; }; if alt0; then echo compliant; fi- Expected output
compliant
How it is fixed
Fix method: Guidance or infrastructure patch
Edit the file /etc/firewalld/firewalld.conf and add or modify the following line: FirewallBackend=nftables
Properties
- Operating systems
- rocky-9
- Tags
- cis-convertedlinux
- Reference
- CIS Rocky Linux 9 Benchmark v3.0.0 - 4.1.2
Check this host
Run this on a machine you are allowed to audit. The scan is read-only.
shell
tmaegis scan --target linux