← Rules Catalog
mediumnetwork

Ensure nftables base chains exist

nftables-base-chains · RHEL ≥ 8 · 1 impl

Description

When using nftables directly, base chains for input, forward, and output traffic must be configured.

Rationale

Base chains are required to process network traffic. Without them, nftables rules cannot be applied to filter network traffic.

Check → Remediate

Checkcommand
# Check for base chains in nftables
chains=$(nft list ruleset 2>/dev/null | grep -E "type filter hook (input|forward|output)")
if [ -z "$chains" ]; then
  echo "FAIL: nftables base chains not configured"
  exit 1
fi
echo "OK: nftables base chains exist"
exit 0
expected_exit:
0
Remediatemanual
note:
Configure nftables base chains. Example: nft add table inet filter nft add chain inet filter input { type filter hook input priority 0 \; } nft add chain inet filter forward { type filter hook forward priority 0 \; } nft add chain inet filter output { type filter hook output priority 0 \; }

Framework references

CIS

rhel9 4.3.1

NIST 800-53

SC-7
#firewall#nftables#security