4.2.4 Log Suspicious Packets - net.ipv4.conf.all.log_martians = 1

Information

When enabled, this feature logs packets with un-routable source addresses to the kernel log.

Rationale:

Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their server.

Solution

Set the net.ipv4.conf.all.log_martians and net.ipv4.conf.default.log_martians parameters to 1 in /etc/sysctl.conf:

net.ipv4.conf.all.log_martians=1
net.ipv4.conf.default.log_martians=1

Run the following commands to set the active kernel parameters:

# /sbin/sysctl -w net.ipv4.conf.all.log_martians=1
# /sbin/sysctl -w net.ipv4.conf.default.log_martians=1
# /sbin/sysctl -w net.ipv4.route.flush=1

Default Value:

OS Default: No

See Also

https://workbench.cisecurity.org/files/3096

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-7b., CSCv7|9.2

Plugin: Unix

Control ID: fee6e081ff1c95a82dcfaece59423c73a9696800b20988602b8d5ea9aef81e64