As a protocol of the transport layer, ICMP actually has the task of transporting error and diagnostic information. However, an attacker can disrupt the availability of the network as well as find out information about the network by misusing ICMP messages. When using ICMP, mechanisms should be implemented to detect and prevent the misuse of ICMP types and codes. The ICMP packet types listed below should be considered as a minimum:

  • Typ 0 (Echo-Replay)
  • Typ 5 (Redirect)
  • Typ 3 (Destination Unreachable)
  •  Typ 8 (Echo Request)
  • Typ 13 (Timestamp Request)
  • Typ 15 (Information Request)
  • Typ 17 (Address Mask Request)

With the following few lines it is possible to fend off a PING attack in a simple way.

access-list 101 deny icmp any any echo log
access-list 101 deny icmp any any redirect log
access-list 101 deny icmp any any timestamp-request log
access-list 101 deny icmp any any information-request log
access-list 101 deny icmp any any mask-request log
access-list 101 permit ip any any