障害調査でPingを打つなどしていたのですが、その過程で「正常に動いているサーバからpingが帰ってこない」ということに気づきました。このサーバは、AWSのEC2でした。
デフォルトのセキュリティグループ
AWSでは、「セキュリティグループ」といって、どこからのどんな通信を受け付けるかを設定する機能があります。デフォルトではこれはSSHのみとなっていて、(SSHトンネリングですべて片付くような用事ならともかく)まっとうな用途に使うにもポート開放は必須となっています。
で、「SSH以外すべて」弾くようになっている、ということは、Pingに使うICMPもその対象となってしまいます。もしPingに反応して欲しいなら、ICMPにも反応するように、設定を書き換える必要があります(ICMPについてはPing用のECHOなど、種類に応じて開閉を調整できます)。
ある意味、当然と言えば当然なのですが、むしろ「Pingを返す」ほうが常識に近かったので、ちょいと面食らってしまいました。