OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: Untoasted9563 on January 03, 2023, 03:22:38 PM

Title: using OPNsense API for centralized fail2ban-server
Post by: Untoasted9563 on January 03, 2023, 03:22:38 PM
Hi all,

After searching the forum, there is not a lot of using fail2ban with OPNsense. I wanted to create a centralized fail2ban server: meaning, if a person/IP is banned on one service, it should be banned for all of them and in the first line of defence, not only deep inside my network.

So I did some digging and found the following fail2ban action on Github:
https://github.com/fail2ban/fail2ban/pull/2761/files

Which lead me to something like this:
(https://i.postimg.cc/fLXcfZD4/fail2ban-strategy.png) (https://i.postimg.cc/fLXcfZD4/fail2ban-strategy.png)

It works like this:

It seems to have been working out quite nicely, but since I am rather new to OPNsense, some questions came up:


Thanks for reading, looking forward to hear any feedback about this concept.
Cheers