Configure the Host
System to Log IPv4 Martian Packets
As a security best
practice, verify that the host system logs IPv4 Martian packets. Martian
packets contain addresses that the system knows to be invalid. Configure the
host system to log the messages so that you can identify misconfigurations or
attacks in progress.
- Run the# grep [01] /proc/sys/net/ipv4/conf/*/log_martians|egrep "default|all"command to check whether the host logs IPv4 Martian packets.
- Configure the host system to log IPv4 Martian packets.
- Open the/etc/sysctl.conffile to configure the host system.
- If the values are not set to1, add the following entries to the file or update the existing entries accordingly. Set the value to1.net.ipv4.conf.all.log_martians=1 net.ipv4.conf.default.log_martians=1
- Save the changes and close the file.
- Run# sysctl -pto apply the configuration.