# My simple IPS - Suricata + Redis + Edgerouter

**URL:** <https://forum.suricata.io/t/my-simple-ips-suricata-redis-edgerouter/4885>\
**Category:** Tips and Tricks\
**Tags:** ips, suricata\
**Created:** [October 3, 2024, 12:16pm UTC](https://forum.suricata.io/t/my-simple-ips-suricata-redis-edgerouter/4885 "2024-10-03T12:16:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moins20](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@moins20](https://forum.suricata.io/u/moins20)\
**Post date:** [October 3, 2024, 12:16pm UTC](https://forum.suricata.io/t/my-simple-ips-suricata-redis-edgerouter/4885/1 "2024-10-03T12:16:12Z")

</div>

Hi all,  
Just wanted to share with you the IPS setup I have put in place to protect my home LAN… It is based on Suricata (of course) to identify malicious IPs triggering alerts.

Those IPs are then registered in a blacklist on my Edgerouter 4 Internet router using the EdgeOS REST API. It took me a bit of tinkering but I have finally managed to achieve a working solution.

Here is how it works in a nutshell:

- I have a Suricata instance monitoring my LAN traffic
- Suricata alerts are pushed to a Redis server
- A Python script pulls the alerts from Redis and gathers the alerts’ source IPs
- The script then adds the offending IPs to an address-group on my Edgerouter through API calls
- This address-group is used in rules to drop traffic originating from the blacklisted IPs

The Python script, Suricata and Redis all run on a little Raspberry Pi4.

For those wanting to try it out, I’ve uploaded my script (adapted from the original work of Justinas Bei [@beinoriusju](https://github.com/beinoriusju)) on GitHub: [GitHub - googleg/hund-ips-edgeos: HUND IPS for EdgeOS (EdgeRouter) and Suricata IDS](https://github.com/googleg/hund-ips-edgeos/tree/main)

---

<div class="post-metadata">

**Author:** ![Jeff\_Lucovsky](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jeff_lucovsky/32/11_2.png) [@Jeff\_Lucovsky](https://forum.suricata.io/u/Jeff_Lucovsky)\
**Post date:** [October 3, 2024, 2:34pm UTC](https://forum.suricata.io/t/my-simple-ips-suricata-redis-edgerouter/4885/2 "2024-10-03T14:34:31Z")

</div>

Thanks for sharing and bringing your solution to the Suricata community!
