3.3.1.11 Ensure net.ipv4.conf.default.secure_redirects is configured

Information

Secure ICMP redirects are the same as ICMP redirects, except they come from gateways listed on the default gateway list. It is assumed that these gateways are known to your system, and that they are likely to be secure.

More information about the kernel parameter configuration files, their location, and load preference is available in the "Configure Network Kernel Parameters" section overview.

It is still possible for even known gateways to be compromised.

Setting net.ipv4.conf.default.secure_redirects to 0 the system the system will not accept IPv4 routing table updates by possibly compromised known gateways on a newly added network interface.

Solution

- Run the following command to comment out net.ipv4.conf.default.secure_redirects lines returned by the audit procedure that are not net.ipv4.conf.default.secure_redirects = 0 :

# sed -ri '^\s*net.ipv4.conf.default.secure_redirects\s*=\s*1/s/^/#/g' "path/to/file/in/audit/filename"

Example:

# sed -ri '/^\s*net.ipv4.conf.default.secure_redirects\s*=\s*1/s/^/#/g' /etc/sysctl.d/99-sysctl.conf
- Create or edit a file in the /etc/sysctl.d/ directory ending in .conf and edit or add the following line:

net.ipv4.conf.default.secure_redirects = 0

Example:

# [ ! -d "/etc/sysctl.d/" ] && mkdir -p /etc/sysctl.d/
# printf '%s\n' "" "net.ipv4.conf.default.secure_redirects = 0" >> /etc/sysctl.d/60-ipv4_sysctl.conf
- Run the following command to load all sysctl configuration files:

# sysctl --system

See Also

https://workbench.cisecurity.org/benchmarks/25279

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6b., CCI|CCI-000366, CSCv7|9.2

Plugin: Unix

Control ID: a3f32cccee7527e9514fb7ccd2e3bac0e35bf35bb3de848e07b0736c54d13740