Skip to content

Verify ip6tables Enabled if Using IPv6

An XCCDF Rule

Description

The ip6tables service can be enabled with the following command:
$ sudo systemctl enable ip6tables.service

Rationale

The ip6tables service provides the system's host-based firewalling capability for IPv6 and ICMPv6.

ID
xccdf_org.ssgproject.content_rule_service_ip6tables_enabled
Severity
Medium
References
Updated

Remediation Templates

An Ansible Snippet

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - NIST-800-53-AC-4
  - NIST-800-53-CA-3(5)

A Shell Script

# Remediation is applicable only in certain platforms
if dpkg-query --show --showformat='${db:Status-Status}
' 'kernel' 2>/dev/null | grep -q installed; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" unmask 'ip6tables.service'
"$SYSTEMCTL_EXEC" start 'ip6tables.service'

A Puppet Snippet

include enable_ip6tables
class enable_ip6tables {
  service {'ip6tables':
    enable => true,
    ensure => 'running',
  }
}

OS Build Blueprint

[customizations.services]
enabled = ["ip6tables"]