# ICMP Drop threshold for Suricata IPS

**URL:** <https://forum.suricata.io/t/icmp-drop-threshold-for-suricata-ips/3594>\
**Category:** Rules\
**Tags:** ips, rules, suricata\
**Created:** [June 15, 2023, 12:34am UTC](https://forum.suricata.io/t/icmp-drop-threshold-for-suricata-ips/3594 "2023-06-15T00:34:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![demoxCZ](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/demoxcz/32/2108_2.png) [@demoxCZ](https://forum.suricata.io/u/demoxCZ)\
**Post date:** [June 15, 2023, 12:34am UTC](https://forum.suricata.io/t/icmp-drop-threshold-for-suricata-ips/3594/1 "2023-06-15T00:34:32Z")

</div>

Hello guys,

I am trying to make a rule which will drop traffic IF ICMP traffic is more than 5 ICMP req per 10 seconds

I am using this, but it drops ICMP traffic immediately:

`drop icmp any any -> $HOME_NET any (threshold: type limit, track by_src, count 5, seconds 10; msg: "ICMP Request Blocked"; sid:2; rev:1;)`

Is there something that I am doing wrong ?

Thank you for any hint/help 🙂

---

<div class="post-metadata">

**Author:** ![bmurphy](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bmurphy](https://forum.suricata.io/u/bmurphy)\
**Post date:** [June 15, 2023, 1:37am UTC](https://forum.suricata.io/t/icmp-drop-threshold-for-suricata-ips/3594/2 "2023-06-15T01:37:26Z")

</div>

I think you might be looking for the `threshold: type threshold` option.  
[https://docs.suricata.io/en/latest/rules/thresholding.html#type-threshold](https://docs.suricata.io/en/latest/rules/thresholding.html#type-threshold)

---

<div class="post-metadata">

**Author:** ![demoxCZ](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/demoxcz/32/2108_2.png) [@demoxCZ](https://forum.suricata.io/u/demoxCZ)\
**Post date:** [June 15, 2023, 10:24am UTC](https://forum.suricata.io/t/icmp-drop-threshold-for-suricata-ips/3594/3 "2023-06-15T10:24:13Z")

</div>

I tried that too but difference is that nothing is blocked ☹

---

<div class="post-metadata">

**Author:** ![bmurphy](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bmurphy](https://forum.suricata.io/u/bmurphy)\
**Post date:** [June 15, 2023, 1:52pm UTC](https://forum.suricata.io/t/icmp-drop-threshold-for-suricata-ips/3594/4 "2023-06-15T13:52:08Z")

</div>

Well, if you’re using `type limit`, I would expect it to start dropping ICMP traffic immediately.

My only guess is that you’re not meeting the threshold. At first glance I don’t see anything wrong with the rule (assuming using `type threshold`).

Are you able to collect a pcap of the traffic for offline testing?
