Skip to content

Configure Firewalld to Use the Nftables Backend

An XCCDF Rule

Description

Firewalld can be configured with many backends, such as nftables.

Rationale

Nftables is modern kernel module for controling network connections coming into a system. Utilizing the limit statement in "nftables" can help to mitigate DoS attacks.

ID
xccdf_org.ssgproject.content_rule_firewalld-backend
Severity
Medium
References
Updated

Remediation Templates

An Ansible Snippet

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - DISA-STIG-OL08-00-040150
  - NIST-800-53-SC-5

A Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel && { rpm --quiet -q firewalld; }; then
if [ -e "/etc/firewalld/firewalld.conf" ] ; then
    
    LC_ALL=C sed -i "/^\s*FirewallBackend\s*=\s*/d" "/etc/firewalld/firewalld.conf"
else