https://github.com/patrickbr/piwik-loginfaillog
Simple Piwik plugin that logs failed login attempts. May be used for securing Piwik with fail2ban or similar tools.
https://github.com/patrickbr/piwik-loginfaillog
Last synced: 9 months ago
JSON representation
Simple Piwik plugin that logs failed login attempts. May be used for securing Piwik with fail2ban or similar tools.
- Host: GitHub
- URL: https://github.com/patrickbr/piwik-loginfaillog
- Owner: patrickbr
- Created: 2017-07-23T00:56:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-09T08:13:50.000Z (about 2 years ago)
- Last Synced: 2025-05-30T06:19:57.246Z (10 months ago)
- Language: PHP
- Homepage:
- Size: 6.84 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Piwik / Matomo LoginFailLog Plugin
## Description
This simple plugin enables logging of failed authentication attempts in Piwik / Matomo, nothing more, nothing less. Failed login attempts are logged like this:
```
WARNING LoginFailLog[2017-07-22 23:35:20] [b215d] Failed login from 172.217.22.227 with username 'patrick'.
WARNING LoginFailLog[2017-07-22 23:35:20] [b215d] Failed login from 172.217.22.227 with username 'patrick'.
```
This is useful if you want to secure your Piwik instance with fail2ban or similar tools that work on log files. For example, the following filter can be used with fail2ban to detect and count login fails:
```
# Fail2Ban configuration file for Piwik with LoginFailLog plugin
[Definition]
failregex = .* Failed login from with username .*
```
## Where is the log file?
If you have trouble finding the log file of Piwik / Matomo, take a look [here](https://matomo.org/faq/troubleshooting/faq_115/). Basically, you have to enable file logging and specify a log file path.
## Incompatibility problems because of Piwik / Matomo UTC logging
By default, Piwik / Matomo logs everything in UTC time. This is not configurable and may cause problems with fail2ban. If your fail2ban jail does not work, **try increasing the `findtime` option in your jail by the offset between your local timezone and UTC**.
## License
GPL v3 or later