4.3.6 Ensure nftables loopback traffic is configured
hide: - toc title: 4.3.6 Ensure nftables loopback traffic is configured description: Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network tags: - Level 1 - Workstation - Server - Host Based Firewall - Configure nftables - Automated - 4.4 Implement and Manage a Firewall on Servers - 4.5 Implement and Manage a Firewall on End-User Devices - IG1 - IG2 - IG3 - T1562 - T1562.004 - TA0005
Audit#
Run the following commands to verify that the loopback interface is configured: Run the following command to verify the loopback interface is configured to accept network traffic:
Example output:
Run the following command to verify network traffic from an iPv4 loopback interface is configured to drop:
Example output:
- IF - IPv6 is enabled on the system: Run the following command to verify that the IPv6 loopback interface is configured to drop:
Example output:
Remediation#
Run the following commands to implement the loopback rules:
# nft add rule inet filter input iif lo accept
# nft create rule inet filter input ip saddr 127.0.0.0/8 counter drop
- IF - IPv6 is enabled on the system: Run the following command to implement the IPv6 loopback rule: