Martian sources errors showing in messages log
This document (3923798) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 12
Situation
Sep 6 21:30:58 suse kernel: martian source 192.168.1.255 from 192.168.1.251, on dev eth3 Sep 6 21:30:58 suse kernel: ll header: ff:ff:ff:ff:ff:ff:00:18:f8:0e:81:93:08:00 Sep 6 21:31:31 suse kernel: martian source 192.168.1.10 from 192.168.1.251, on dev eth3 Sep 6 21:31:31 suse kernel: ll header: ff:ff:ff:ff:ff:ff:00:18:f8:0e:81:93:08:06 Sep 6 21:36:42 suse kernel: martian source 192.168.1.10 from 192.168.1.50, on dev eth3 Sep 6 21:36:42 suse kernel: ll header: ff:ff:ff:ff:ff:ff:00:08:02:8c:aa:47:08:06 Sep 6 21:36:44 suse kernel: martian source 192.168.1.255 from 192.168.1.50, on dev eth3 Sep 6 21:36:44 suse kernel: ll header: ff:ff:ff:ff:ff:ff:00:08:02:8c:aa:47:08:00
appear in /var/log/messages.
Resolution
A martian header source is usually a IP address that should not be routable. For example, a 127.0.0.0/8 IP address coming through a router, would be labeled as being martian. Other sources of martian sources would be a computer that is trying to use a class E address. Other causes may include network topology.
As Defined by RFC 1812
RFC 1812defines what a martian source would be. From the RFC:
"An IP source address is invalid if it is a special IP address, as defined in 4.2.2.11 or 5.3.7, or is not a unicast address.
Another Consideration: Network Topography
Much of the problems experienced with martian source is caused by network topography considerations. The following may need to be addressed:
-
Router: The router may be routing through illegal addresses; make sure that the router is configured correctly.
-
Multiple NICS: If a computer has multiple NIC cards plugged in to the same switch, then it martian sources may be shown (this is the most common cause).
-
Firewall: Is there a firewall allowing inappropriate traffic in?
-
IP addresses: Are you using multicast or Class E network addresses?
-
Other computers: Are other servers or workstations MAC addresses responsible?
Turn off logging to the kernel:If you are able to determine that the martian sources are not related to a security issue, then you may turn off martian source logging. Please note, you must make sure that you are sure that the network is secure and that the source of these messages are not from the router.
- In /etc/sysconfig/sysctl add "net.ipv4.conf..log_martians=0"
-
Make sure that "sysctl" is set to run on boot by "chkconfig boot.sysctl on"
Redirect Martian Logging: Another solution is to move the logging from /var/log/messages. This can be done in the syslog.
-
Add "filter f_martian { match('^martian source'); };" to /etc/syslog-ng/sysconfig.conf
-
In the filter destinations, find "filter f_console" and add"and not filter(f_martian)" For example:
-
filter f_console { level(warn) and facility(kern) and not filter(f_iptables)
or level(err) and not facility(authpriv) and not filter(f_martian); }; -
Add the following: destination martian { file("/var/log/martian"); };
log { source(src); filter (f_martian); destination(martian); }; -
Run "SuSEconfigure --module syslog-ng"
-
Restart syslog, "rcsyslog restart"
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:3923798
- Creation Date: 13-Oct-2007
- Modified Date:15-Aug-2022
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com