These days I get some Martian packets in the kern.log:
Jul 7 02:28:20 box14932 kernel: [789192.798073] IPv4: martian source XXX.XXX.XXX.XXX from 10.91.12.01, on dev eth1
Jul 7 02:28:20 box14932 kernel: [789192.798095] ll header: 00000000: 44 a8 12 41 1d 2b 13 8b 9c ab 34 89 10 00 D.BB.......Y..
Jul 7 04:29:12 box14932 kernel: [798267.423393] IPv4: martian source XXX.XXX.XXX.XXX from 10.91.20.10, on dev eth1
Jul 7 04:29:12 box14932 kernel: [798267.423401] ll header: 00000000: 44 a8 12 41 1d 2b 13 8b 9c ab 34 89 10 00 D.BB.......Y..
Jul 7 04:29:12 box14932 kernel: [798267.423408] IPv4: martian source XXX.XXX.XXX.XXX from 10.91.20.10, on dev eth1
Jul 7 04:29:12 box14932 kernel: [798267.423410] ll header: 00000000: 44 a8 12 41 1d 2b 13 8b 9c ab 34 89 10 00 D.BB.......Y..
The source "XXX.XXX.XXX.XXX" is the public IP address of my server.
I'm searching on Google, I have not really found what it was. Is this a spoof attack or simply a network config problem on my server?
I have two interfaces on my server:
- eth1 is the main interface (public IP)
- eth2 is a RPN interface (Real Private Network, therefore not connected to the public network) and whose IP address starts with 10.91...
- lo which is loopback, obviously.
Here is my sysctl.conf configuration where rp_filter=1 and log_martians=1 :
# Log Martians
net.ipv4.conf.all.log_martians = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
# IP Spoofing protection
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
# Disable source packet routing
net.ipv4.conf.all.accept_source_route = 0
net.ipv6.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv6.conf.default.accept_source_route = 0
# Ignore send redirects
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
# Block SYN attacks
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 5
# Ignore ICMP redirects
net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
Can someone help me? Should I worry about these martian?
What do you say about adding iptables rules to DROP and LOG the packets, like :
-A INPUT -i -s 10.0.0.0/8 ENO1 j DROP
Many thanks for your help