我已经设置了fail2ban来保护主机,并且我注意到了这条信息
#_daemon = asterisk
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>:.*" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
Run Code Online (Sandbox Code Playgroud)
正则表达式如何(?:::f{4,6}:)?(?P<host>\S+)工作?我一直在几个不同的正则表达式检查器和解释器中尝试它,但没有一个可以解析它,至少是部分(?P<host>\S+)。
(?P<name>regex)
将“regex”匹配的文本捕获到“name”组中。该名称可以包含字母和数字,但必须以字母开头。
http://www.regular-expressions.info/refext.html
(?:::f{4,6}:)?(?P<host>\S+)
Run Code Online (Sandbox Code Playgroud)
