mediumnetwork
Ensure nftables loopback traffic is configured
nftables-loopback · RHEL ≥ 8 · 1 impl
Description
When using nftables directly, loopback traffic should be configured to allow localhost communication while blocking spoofed loopback traffic.
Rationale
Loopback traffic is essential for local services. However, spoofed loopback traffic from external sources should be blocked.
Check → Remediate
Checkcommand
# Check for loopback accept rule ruleset=$(nft list ruleset 2>/dev/null) if echo "$ruleset" | grep -qE "iif.*lo.*accept"; then echo "OK: nftables loopback traffic is configured" exit 0 fi echo "FAIL: nftables loopback traffic not configured" exit 1
- expected_exit:
- 0
Remediatemanual
- note:
- Configure nftables loopback traffic: nft add rule inet filter input iif lo accept nft add rule inet filter input ip saddr 127.0.0.0/8 counter drop
Framework references
CIS
rhel9 4.3.4
NIST 800-53
SC-7
NIST 800-171
3.13.6[b]
CMMC Level 2
SC.L2-3.13.6
#firewall#nftables#loopback#security