Hi Patrick,
Thanks for your work. Perhaps it is apparent to everyone else except me how to implement this.
- need to setup piwik to log to file ... (my default installation was logging to screen only)
- In case I manage to write (eventually) your entry to the "main" auth.log I have modified your php code to make a log entry "Failed PIWIK login ..." to distinguish piwik login failures from others in the same log.
- Created a matching filter to use that log entry ... and saved in /etc/fail2ban/filters.d/
- need to set up a jail with path to the piwik log ... (/path to piwik/tmp/logs/piwik.log) and using the above filter.
- restart fail2ban on your server
Tested by logging in (from another IP via VPN) - failed login recorded in log file and fail2ban blocking access for the IP ... YEAH!
If you like the these files for posting here or on your site - please let me know (not yet familiar with the proper etiquette here ... :-)
Greets/Jes
Hi Patrick,
Thanks for your work. Perhaps it is apparent to everyone else except me how to implement this.
Tested by logging in (from another IP via VPN) - failed login recorded in log file and fail2ban blocking access for the IP ... YEAH!
If you like the these files for posting here or on your site - please let me know (not yet familiar with the proper etiquette here ... :-)
Greets/Jes