很多管理员用 IPSec 策略“防 Ping”,实则是“格杀勿论”过滤所有 ICMP 报文,导致 MTU 路径发现失效、集群心跳中断、监控探测失灵。本文提供三种精准仅阻断 Echo Request(Type 8 Code 0) 的方案。
IPSec 策略按协议号(ICMP=1)过滤,无法区分 ICMP 类型。ICMP 包含 11 种报文,Echo Request(8/0) 仅是其中一种。过滤全部会导致:
Destination Unreachable(3/x) 丢失 → PMTU 黑洞,大包传输失败;Time Exceeded(11/0) 丢失 → Traceroute 失效、路由环路不可见;Parameter Problem(12/0) 丢失 → 协议错误无法通知;以 瑞星/火绒/Windows Defender 防火墙 为例:

瑞星个人防火墙精准阻断 Echo Request 设置界面


RRAS 入站筛选器配置:选外网网卡、添加 ICMP Type 8 Code 0 过滤器
在 NGFW(如 Palo Alto、FortiGate、华为/华三/深信服等)创建规则:
Source: Any / Trust Zone
Destination: Self / Server Zone
Service: icmp-ping (预定义 Echo Request)
Action: Deny
Log: Enable
同理可精准放行 icmp-unreachable、icmp-time-exceeded 等必要类型。