求 V 友帮忙看看指点一下 谢谢!
目的是想用 fail2ban 屏蔽来探测的 ip
log 如下 :
Aug 15 08:59:07 <hostname> ss-server[1382]: 2018-08-15 08:59:07 ERROR: failed to handshake with <HOST>: authentication error
正规表达式如下:
failregex = ^\w+\s+\d+ \d+:\d+:\d+\s+%(__prefix_line)sERROR:\s+failed to handshake with <HOST>: authentication error$
我测试却没法匹配, 不知道问题出在哪?
fail2ban-regex '2019-03-21 02:50:41 ERROR: failed to handshake with 95.179.169.185: authentication error' '^\w+\s+\d+ \d+:\d+:\d+\s+%(__prefix_line)sERROR:\s+failed to handshake with <HOST>: authentication error$'
Running tests
=============
Use failregex line : ^\w+\s+\d+ \d+:\d+:\d+\s+%(__prefix_line)sERROR:\s...
Use single line : 2019-03-21 02:50:41 ERROR: failed to handshake wit...
Results
=======
Failregex: 0 total
Ignoreregex: 0 total
Date template hits:
|- [# of hits] date format
| [1] Year(?P<_sep>[-/.])Month(?P=_sep)Day 24hour:Minute:Second(?:,Microseconds)?
`-
Lines: 1 lines, 0 ignored, 0 matched, 1 missed
[processed in 0.00 sec]
|- Missed line(s):
| 2019-03-21 02:50:41 ERROR: failed to handshake with 95.179.169.185: authentication error
`-
目的是想用 fail2ban 屏蔽来探测的 ip
log 如下 :
Aug 15 08:59:07 <hostname> ss-server[1382]: 2018-08-15 08:59:07 ERROR: failed to handshake with <HOST>: authentication error
正规表达式如下:
failregex = ^\w+\s+\d+ \d+:\d+:\d+\s+%(__prefix_line)sERROR:\s+failed to handshake with <HOST>: authentication error$
我测试却没法匹配, 不知道问题出在哪?
fail2ban-regex '2019-03-21 02:50:41 ERROR: failed to handshake with 95.179.169.185: authentication error' '^\w+\s+\d+ \d+:\d+:\d+\s+%(__prefix_line)sERROR:\s+failed to handshake with <HOST>: authentication error$'
Running tests
=============
Use failregex line : ^\w+\s+\d+ \d+:\d+:\d+\s+%(__prefix_line)sERROR:\s...
Use single line : 2019-03-21 02:50:41 ERROR: failed to handshake wit...
Results
=======
Failregex: 0 total
Ignoreregex: 0 total
Date template hits:
|- [# of hits] date format
| [1] Year(?P<_sep>[-/.])Month(?P=_sep)Day 24hour:Minute:Second(?:,Microseconds)?
`-
Lines: 1 lines, 0 ignored, 0 matched, 1 missed
[processed in 0.00 sec]
|- Missed line(s):
| 2019-03-21 02:50:41 ERROR: failed to handshake with 95.179.169.185: authentication error
`-