- 论坛徽章:
- 0
|
我使用fail2ban做正则表达式匹配的时候总是匹配不上,下面是匹配结果,请大神指点。
[root@localhost ~]# fail2ban-regex 'Jun 3 02:40:16 localhost postfix/smtpd[6206]: warning: 89.248.174.101: hostname hosted-by.ecatel.net verification failed: Name or service not known' 'localhost postfix/smtpd\[.*?\]: warning: \[<HOST>\]: hostname .*? verification failed: Name or service not known'
Running tests
=============
Use regex line : localhost postfix/smtpd\[.*?\]: warning: \[<HOST>\...
Use single line: Jun 3 02:40:16 localhost postfix/smtpd[6206]: war...
Results
=======
Failregex
|- Regular expressions:
| [1] localhost postfix/smtpd\[.*?\]: warning: \[<HOST>\]: hostname .*? verification failed: Name or service not known
|
`- Number of matches:
[1] 0 match(es)
Ignoreregex
|- Regular expressions:
|
`- Number of matches:
Summary
=======
Sorry, no match
Look at the above section 'Running tests' which could contain important
information.
|
|