Verify nftables Service is Disabled
An XCCDF Rule
Description
nftables is a subsystem of the Linux kernel providing filtering and classification of network
packets/datagrams/frames and is the successor to iptables.
The nftables
service can be disabled with the following command:
systemctl disable nftables
Rationale
Running both firewalld
and nftables
may lead to conflict. nftables
is actually one of the backends for firewalld
management tools.
- ID
- xccdf_org.ssgproject.content_rule_service_nftables_disabled
- Severity
- Medium
- Updated
Remediation - Puppet
include disable_nftables
class disable_nftables {
service {'nftables':
enable => false,
ensure => 'stopped',
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- PCI-DSSv4-1.2
- PCI-DSSv4-1.2.1
Remediation - OS Build Blueprint
[customizations.services]
masked = ["nftables"]
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if ( rpm --quiet -q firewalld && rpm --quiet -q nftables && rpm --quiet -q kernel ); then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'nftables.service'
"$SYSTEMCTL_EXEC" disable 'nftables.service'