最後更新: 2021-01-14
介紹
rp_filter
martian source is basically an invalid, non routeable ip
... VZserver kernel: [31200.144106] martian source 192.168.123.11 from 0.0.0.0, on dev venet0 ... VZserver kernel: [31200.144112] ll header: 45:c0:00:xx:xx:xx:00:00:40:xx:xx:xx:00:00
- destination MAC address
- source MAC address
- ethertype
當主介面沒有 IP 時 (尤其經 DHCP 拿不到 ip)
那 Host 會發現該封包‘顯然’不屬於自己的網路
解决方法:
此問題一般來說是需要注視的 !!
除非你在一個 Segment 內有多個一個 Network(當 source IP 不在你 subnet 時)
echo 0 > /proc/sys/net/ipv4/conf/all/log_martians
關掉 rp_filter
echo 0 >/proc/sys/net/ipv4/conf/eth0/rp_filter
/etc/sysctl.conf
net.ipv4.conf.default.rp_filter=0