What is the kernel parameter net.ipv4.conf.all.log_martians for?

https://access.redhat.com/solutions/27840

What is the kernel parameter net.ipv4.conf.all.log_martians for? Solution Verified - Updated August 7 2024 at 6:50 AM - English Environment

Red Hat Enterprise Linux
IPv4 networking

Issue

What is the kernel parameter net.ipv4.conf.all.log_martians for? How to disable martin log creation? Resolution

The kernel parameter net.ipv4.conf.all.log_martians is used to control logging when the kernel receives a packet with an impossible source or destination address.

The log_martians parameter can also be controlled for all current interfaces with all, or per-interface for example net.ipv4.conf.eth0.log_martians

To make the changing of this tunable permanent, it can be set in /etc/sysctl.conf such as:

Below sysctl parameter will enable the martians logs for all interfaces Raw

net.ipv4.conf.all.log_martians = 1

If you want to disable martian logs for all interfaces then add the below parameter into “/etc/sysctl.conf” Raw

net.ipv4.conf.all.log_martians = 0

If you want to disable martian logs for only particular interfaces then add the below parameter into “/etc/sysctl.conf” Raw

Syntax:

net.ipv4.conf..log_martians = 0

Note:

0 –> Indicate disable martians logs

1 –> Indicate enable martians logs

Example:

net.ipv4.conf.eth0.log_martians = 0

This will be applied at system boot and can be applied during runtime with the sysctl -p command. Root Cause

The concept of a martian source is described further at:

Why do I see "martian source" in the messages file?

Updated: