# Elastalertrule - exclude ip#

**URL:** <https://discuss.elastic.co/t/elastalertrule-exclude-ip/113028>\
**Category:** Elasticsearch\
**Created:** [December 22, 2017, 3:33pm UTC](https://discuss.elastic.co/t/elastalertrule-exclude-ip/113028 "2017-12-22T15:33:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![musican73](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@musican73](https://discuss.elastic.co/u/musican73)\
**Post date:** [December 22, 2017, 3:33pm UTC](https://discuss.elastic.co/t/elastalertrule-exclude-ip/113028/1 "2017-12-22T15:33:44Z")

</div>

Hello!  
I need help to exclude an IP# in a rule.

This rule watches for firewall\_rejects. I have started with this:

**filter:**  
**- regexp:**  
\*\* ip\_address: "^(?!192.168.0.2).\*$"\*\*

I do not need alertings or emails from the IP# 192.168.0.2 in this rule, what is to do?

Br,  
Martin

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [December 22, 2017, 11:04pm UTC](https://discuss.elastic.co/t/elastalertrule-exclude-ip/113028/2 "2017-12-22T23:04:21Z")

</div>

This forum is for official Elastic software. For Elastalert I suggest that you try some other discussion forum such as StackOverflow or maybe ask the authors directly.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 19, 2018, 11:04pm UTC](https://discuss.elastic.co/t/elastalertrule-exclude-ip/113028/3 "2018-01-19T23:04:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
