Anyone willing to share the jail and filter settings for Fail2Ban and CMSMS?
Have just updated my VPS and would like to add a jail etc to protect the login for CMSMS. I have done this before but I failed to keep my notes on it and REGEX just makes my brain bleed at times.
Fail2Ban and CMSMS
Re: Fail2Ban and CMSMS
In our #cms channel in Slack I once posted a simple UDT to get the failed logins logged in the error_log.
The needed regex for Fail2Ban hasn't been shared unfortunately that time.
The needed regex for Fail2Ban hasn't been shared unfortunately that time.
...
But you can create a udt to do so and attach it to the LoginFailed event
Result in the error log:Code: Select all
error_log('CMSMSLOGINFAILED ' . \cms_utils::get_real_ip());
Code: Select all
[02-Nov-2020 21:22:21 Europe/Amsterdam] CMSMSLOGINFAILED xx.xx.7.112
-
- Forum Members
- Posts: 42
- Joined: Sun May 02, 2010 3:54 pm
Re: Fail2Ban and CMSMS
I haven't tested it much yet but a filter of CMSMSLOGINFAILED might be enough.