首页/网络/IP 与子网速查/Bogon/martian:非法源地址过滤
私网与特殊地址45 条

Bogon/martian:非法源地址过滤

Bogon 指不应出现在公网路由中的地址(私网、保留、未分配段);Linux 内核把非法来源报文标记为 martian source 并丢弃,边缘设备用 bogon 前缀列表过滤。

IP 与子网速查网络更新于 2026-10-12
常见 bogon0.0.0.0/8、127/8、169.254/16、224/4、240/4、私网段等
Linux 行为martian source 日志 + 丢弃(rp_filter 相关)
建议公网接口入向过滤 bogon 源,防伪造与扫描

观察 martian 日志与 rp_filter

观察 martian 日志与 rp_filter
dmesg | grep -i 'martian source' | tail -5
sysctl net.ipv4.conf.all.rp_filter   # 1 = 严格反向路径校验
GRE/IPIP 隧道接口偶发被 rp_filter 丢弃:多路径/隧道场景把对应接口 rp_filter 调整为 0/2(评估安全影响)。

易错点

  • NAT 前侧看到私网源被丢弃属预期:上游已做 bogon 过滤
  • 隧道/多宿主环境贸然开启严格 rp_filter:合法回包被丢,间歇丢包

数据来源与参考

  • RFC 6890(特殊用途地址)
  • Linux 内核文档(rp_filter)

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌