这些是我在 /etc/fail2ban 中的配置:
** jail.local**
[joomla-login-errors]
enabled = true
port = http,https
filter = joomla-login-errors
logpath = /var/www/path-to-website/logs/error.php
maxretry = 2
** filter.d/joomla-login-errors.conf**
[Definition]
failregex = ^%(__prefix_line)s*INFO <HOST>.*joomlafailure.*Username.*$
如果我尝试:
fail2ban-regex /var/www/path-to-website/logs/error.php '^%(__prefix_line)s*INFO <HOST>.*joomlafailure.*Username.*$'
没有匹配到任何内容,但是大多数行都是这样的(IP 是虚构的,但我的文件上的是真实的):
2019-08-20T09:57:42+00:00 INFO 500.188.602.500 joomlafailure Username and password do not match or you do not have an account yet