diff --git a/LoginFailLog.php b/LoginFailLog.php index 4447f96..31906ff 100644 --- a/LoginFailLog.php +++ b/LoginFailLog.php @@ -28,7 +28,7 @@ public function logFailedLogin($login) { $ip = StaticContainer::get('Piwik\IP'); $logger = StaticContainer::get('Psr\Log\LoggerInterface'); - $logger->warning('Failed login from {ip} with username \'{user}\'.', array( + $logger->warning('Failed PIWIK login from {ip} with username \'{user}\'.', array( 'ip' => $ip->getIpFromHeader(), 'user' => $login )); diff --git a/piwik2.conf b/piwik2.conf new file mode 100644 index 0000000..0ff4b72 --- /dev/null +++ b/piwik2.conf @@ -0,0 +1,19 @@ +# ------------------------------------------------------------------------- +# Fail2Ban jail for piwik - /etc/fail2ban/jail.d/piwik2.conf +# For use with filter /etc/fail2ban/filter.d/piwik-2018A.conf +# ------------------------------------------------------------------------- +# NOTE: The `logpath` parameter, provided below, is a common path, +# However, it *may* not be the correct path on YOUR server setup. +# Adjust accordingly! +# Common Paths: +# - Debian/Ubuntu/FreeBSD /var/log/auth.log +# - Fedora /var/log/secure +# - macOS/OS X /var/log/secure.log +# ------------------------------------------------------------------------- +# +[piwik-2018A] +enabled = true +filter = piwik-2018A +logpath = /full/path/to/your/piwik/installation/tmp/logs/piwik.log +maxretry = 3 +port = http,https