Configure Firewalld to Trust Loopback Traffic
An XCCDF Rule
Description
Assign loopback interface to the firewalld
trusted
zone in order to
explicitly allow the loopback traffic in the system.
To configure firewalld
to trust loopback traffic, run the following command:
sudo firewall-cmd --permanent --zone=trusted --add-interface=loTo ensure
firewalld
settings are applied in runtime, run the following command:
firewall-cmd --reload
Rationale
Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.
- ID
- xccdf_org.ssgproject.content_rule_firewalld_loopback_traffic_trusted
- Severity
- Medium
- Updated
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- PCI-DSSv4-1.4
- PCI-DSSv4-1.4.1
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then
if ! rpm -q --quiet "firewalld" ; then
yum install -y "firewalld"
fi