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 - Puppet

include enable_ip6tables

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

Remediation - OS Build Blueprint


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

Remediation - Ansible

- name: Enable service ip6tables
  block:

  - name: Gather the package facts
    package_facts:
      manager: auto

Remediation - Shell Script

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

SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" unmask 'ip6tables.service'
"$SYSTEMCTL_EXEC" start 'ip6tables.service'