【发布时间】:2017-09-29 06:21:32
【问题描述】:
大家好,我正在尝试使用 fail2ban 配置 joomla,所以我创建了
文件/etc/fail2ban/filter.d/joomla-error.conf
并添加如下失败正则表达式:
failregex = [[]client <HOST>[]] user .* authentication failure.*
在我将此代码添加到jail.conf之后
[joomla-error]
enabled = true
port = http,https
filter = joomla-error
logpath = /var/log/httpd/domains/jayjezz.com.error.log
maxretry = 5
bantime = 30
日志路径是正确的,但每次我尝试重新加载 fail2ban 服务时都会得到
ERROR NOK: ("No 'host' group in '[[]client <HOST>[]] user .* authentication failure.*'",)
我认为我的正则表达式有问题,有人可以为我提供正确的正则表达式
[Thu Sep 28 17:14:23.932811 2017] [:error] [pid 6673] [client 000.000.000.000:56806] user xxxxx authentication failure, referer: http://jayjezz.com/administrator/index.php
谢谢
【问题讨论】:
-
也许你可以用一些预期的匹配和失败文本的例子来完善你的问题。
标签: regex centos fail2ban vesta