Ubuntuでしたら etc/ufwを設定してあげる必要があります。
ls /etc/ufwにある
before.rulesファイルとbefore6.rulesファイルを設定します。
まずbefore.rulesの方ですが、
lang
1-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT
2-A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT
3-A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT
4-A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT
5-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT
とあるACCEPTをDROPに変更し保存します。
次に、bfore6.rulesのファイルも同じく、ACCEPTを
lang
1-A ufw6-before-input -p icmp --icmp-type destination-unreachable -j DROP
2-A ufw6-before-input -p icmp --icmp-type source-quench -j DROP
3-A ufw6-before-input -p icmp --icmp-type time-exceeded -j DROP
4-A ufw6-before-input -p icmp --icmp-type parameter-problem -j DROP
5-A ufw6-before-input -p icmp --icmp-type echo-request -j DROP/
に変更します。
その後サーバをリスタートすることでpingのリクエストを拒否することが出来ます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。