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 Templates

A Puppet Snippet

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

An Ansible Snippet

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - CCE-92471-2
  - disable_strategy

A Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel-default; then
# CAUTION: This remediation script will remove firewalld
#	   from the system, and may remove any packages
#	   that depend on firewalld. Execute this
#	   remediation AFTER testing on a non-production