Skip to content

Uninstall firewalld Package

An XCCDF Rule

Description

firewalld (Dynamic Firewall Manager) provides a dynamically managed firewall with support for network/firewall “zones” to assign a level of trust to a network and its associated connections, interfaces or sources. It has support for IPv4, IPv6, Ethernet bridges and also for IPSet firewall settings. There is a separation of the runtime and permanent configuration options. The firewalld package can be removed with the following command:

$ sudo zypper remove firewalld

Rationale

Running both nftables.service and firewalld.service may lead to conflict and unexpected results.

ID
xccdf_org.ssgproject.content_rule_package_firewalld_removed
Severity
Medium
References
Updated



Remediation - Ansible

- name: Ensure firewalld is removed
  package:
    name: firewalld
    state: absent
  when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
  tags:

Remediation - Puppet

include remove_firewalld

class remove_firewalld {
  package { 'firewalld':
    ensure => 'purged',
  }

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then

# CAUTION: This remediation script will remove firewalld
#	   from the system, and may remove any packages
#	   that depend on firewalld. Execute this