Skip to content

Remove iptables-services Package

An XCCDF Rule

Description

The iptables-services package can be removed with the following command:

$ sudo yum erase iptables-services

Rationale

iptables-services provides the services iptables and ip6tables that have been split out of the base package since they are not active by default anymore. These services load the iptables rules during the system startup and also allow one to reload the iptables rules during runtime. Those iptables services conflicts with firewalld so they should be removed if firewalld is used.

ID
xccdf_org.ssgproject.content_rule_package_iptables-services_removed
Severity
Medium
Updated



Remediation - Anaconda Pre-Install Instructions


package --remove=iptables-services

Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - disable_strategy
  - low_complexity

Remediation - Puppet

include remove_iptables-services

class remove_iptables-services {
  package { 'iptables-services':
    ensure => 'purged',
  }

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q iptables; then

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