Skip to content

Install iptables Package

An XCCDF Rule

Description

The iptables package can be installed with the following command:

$ sudo yum install iptables

Rationale

iptables controls the Linux kernel network packet filtering code. iptables allows system operators to set up firewalls and IP masquerading, etc.

ID
xccdf_org.ssgproject.content_rule_package_iptables_installed
Severity
Medium
References
Updated



Remediation - Puppet

include install_iptables

class install_iptables {
  package { 'iptables':
    ensure => 'installed',
  }

Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - NIST-800-53-CM-6(a)
  - PCI-DSS-Req-1.4.1

Remediation - OS Build Blueprint


[[packages]]
name = "iptables"
version = "*"

Remediation - Anaconda Pre-Install Instructions


package --add=iptables

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if ( rpm --quiet -q kernel ); then

if ! rpm -q --quiet "iptables" ; then
    yum install -y "iptables"
fi