Filters

This reference lists the fail2ban capture tags and filter expressions maintained for this release. A filter match identifies a message; the jail using that filter decides how matches are counted and which action follows. See Maintaining fail2ban filters for maintaining installed copies and Configuring fail2ban for jail setup.

Tags

Tag

Description

F-SITE

The site name in the syslog identifier (FQDN or <domain-name>/<site-name> for multisite).

F-SITE_INLINE

The site name in the message body (FQDN or <domain-name>/<site-name> for multisite).

F-ALT_USER

The username.

F-ALT_USER_ID

The user ID.

F-HTTP_STATUS

The HTTP status code.

F-ISO_CODE

The ISO 3166-1 alpha-2 code of the country.

F-POST_ID

The ID of the post.

F-POST_STATUS

The post or comment state: non-existent, closed, trashed, draft, password-protected, or unapproved comment.

F-COMMENT_ID

The ID of the Comment, Pingback, or Trackback.

F-COMMENT_TYPE

The WordPress comment type recorded by the spam message.

F-REQUEST_PATH

The path of the request.

F-ERRCODE

The error code.

F-TRACKBACK_URL

The URL of the Trackback sent.

F-PINGBACK_FROM_URL

The URL of the Pingback sender.

F-PINGBACK_TO_URL

The URL of the Pingback receiver.

F-OPTION_NAME

The protected WordPress option name.

F-OPTION_VALUE

The value supplied for the protected WordPress option.

F-CONTENT

The intermediate WAF message content selected by the WAF filter.

History

Added in version 6.0.0.

Files

wordpress-wpf2b-waf.conf is available only in Premium.

wordpress-hard.conf

Note

This filter is auto-generated.

# Fail2Ban filter for hard failures
#

[INCLUDES]

before = common.conf

[Definition]

_daemon = (?:wordpress|wp)
_tail = (?: on <F-SITE_INLINE>\S+(?:/\S+)?</F-SITE_INLINE>)? from <ADDR>

failregex = ^%(__prefix_line)sBlocked user enumeration attempt<_tail>$ ; id=user-enum
            ^%(__prefix_line)sBlocked username authentication attempt for <F-ALT_USER>.*</F-ALT_USER><_tail>$ ; id=blocked-username
            ^%(__prefix_line)s(?:REST|XML-RPC) authentication attempt(?: \(repeat\))? for unknown user <F-ALT_USER>.*</F-ALT_USER><_tail>$ ; id=auth-api-unknown
            ^%(__prefix_line)sBlocked authentication attempt for <F-ALT_USER>.*</F-ALT_USER><_tail>$ ; id=blocked-user
            ^%(__prefix_line)sPingback error <F-ERRCODE>\d+</F-ERRCODE> generated by "<F-PINGBACK_FROM_URL>.*</F-PINGBACK_FROM_URL>" to "<F-PINGBACK_TO_URL>.*</F-PINGBACK_TO_URL>"<_tail>$ ; id=pingback-error
            ^%(__prefix_line)sXML-RPC request blocked<_tail>$ ; id=xmlrpc-blocked
            ^%(__prefix_line)sXML-RPC multicall authentication failure<_tail>$ ; id=xmlrpc-multicall-auth
            ^%(__prefix_line)sImmediately block connections<_tail>$ ; id=immediate-block
            ^%(__prefix_line)sAttempted access to honeypot \(robots.txt: <F-REQUEST_PATH>.*?</F-REQUEST_PATH>\)<_tail>$ ; id=honeypot-robots
            ^%(__prefix_line)sAkismet discarded spam comment<_tail>$ ; id=comment-spam-akismet
            ^%(__prefix_line)sBlocked access <F-HTTP_STATUS>\d\d\d</F-HTTP_STATUS> from country '<F-ISO_CODE>..</F-ISO_CODE>'<_tail>$ ; id=blocked-country
            ^%(__prefix_line)sBlocked access <F-HTTP_STATUS>\d\d\d</F-HTTP_STATUS> from unknown country<_tail>$ ; id=blocked-country-unknown
            ^%(__prefix_line)sSpam <F-COMMENT_TYPE>.+</F-COMMENT_TYPE> <F-COMMENT_ID>\d+</F-COMMENT_ID><_tail>$ ; id=comment-spam
            ^%(__prefix_line)sTrackback failed for post <F-POST_ID>\d+</F-POST_ID> by "<F-TRACKBACK_URL>.+</F-TRACKBACK_URL>"<_tail>$ ; id=trackback-failed
            ^%(__prefix_line)sUntrusted X-Forwarded-For header<_tail>$ ; id=untrusted-proxy

ignoreregex =

journalmatch = SYSLOG_IDENTIFIER=wordpress

# DEV Notes:
# Requires the 'WP fail2ban' plugin:
# https://wp-fail2ban.com/
#
# Author: Charles Lecklider
# Version: 6.3.0
# Build Date: 2026-10-25T19:01:13+00:00

wordpress-soft.conf

Note

This filter is auto-generated.

# Fail2Ban filter for soft failures
#

[INCLUDES]

before = common.conf

[Definition]

_daemon = (?:wordpress|wp)
_tail = (?: on <F-SITE_INLINE>\S+(?:/\S+)?</F-SITE_INLINE>)? from <ADDR>

failregex = ^%(__prefix_line)sAuthentication attempt with empty (?:username|password)<_tail>$ ; id=auth-empty
            ^%(__prefix_line)s(?:REST|XML-RPC) authentication failure(?: \(repeat\))? for <F-ALT_USER>.*</F-ALT_USER><_tail>$ ; id=auth-api-failure
            ^%(__prefix_line)sAuthentication (?:failure(?: \(repeat\))? for|attempt(?: \(repeat\))? for unknown user) <F-ALT_USER>.*</F-ALT_USER><_tail>$ ; id=auth-failure
            ^%(__prefix_line)sBlocked multicall pingback attempt<_tail>$ ; id=pingback-multicall
            ^%(__prefix_line)sComment attempt on <F-POST_STATUS>(?:non-existent|closed|trashed|draft|password-protected|unapproved comment)</F-POST_STATUS>(?:(?<=unapproved comment) <F-COMMENT_ID>\d+</F-COMMENT_ID> on post|(?<!unapproved comment) post) <F-POST_ID>\d+</F-POST_ID><_tail>$ ; id=comment-attempt
            ^%(__prefix_line)sPingback <F-COMMENT_ID>\d+</F-COMMENT_ID> on post <F-POST_ID>\d+</F-POST_ID> by "<F-PINGBACK_FROM_URL>.+</F-PINGBACK_FROM_URL>"<_tail>$ ; id=pingback
            ^%(__prefix_line)sTrackback <F-COMMENT_ID>\d+</F-COMMENT_ID> on post <F-POST_ID>\d+</F-POST_ID> by "<F-TRACKBACK_URL>.+</F-TRACKBACK_URL>"<_tail>$ ; id=trackback
            ^%(__prefix_line)sFailed password reset(?: for(?: (?:unknown user )?<F-ALT_USER>.*</F-ALT_USER>))?<_tail>$ ; id=password-reset-fail

ignoreregex =

journalmatch = SYSLOG_IDENTIFIER=wordpress

# DEV Notes:
# Requires the 'WP fail2ban' plugin:
# https://wp-fail2ban.com/
#
# Author: Charles Lecklider
# Version: 6.3.0
# Build Date: 2026-10-25T19:01:13+00:00

wordpress-extra.conf

Note

This filter is auto-generated.

# Fail2Ban filter for extra failures
#

[INCLUDES]

before = common.conf

[Definition]

_daemon = (?:wordpress|wp)
_tail = (?: on <F-SITE_INLINE>\S+(?:/\S+)?</F-SITE_INLINE>)? from <ADDR>

failregex = ^%(__prefix_line)sComment <F-COMMENT_ID>\d+</F-COMMENT_ID><_tail>$ ; id=comment-posted
            ^%(__prefix_line)sPassword reset requested for <F-ALT_USER>.*</F-ALT_USER><_tail>$ ; id=password-reset

ignoreregex =

journalmatch = SYSLOG_IDENTIFIER=wordpress

# DEV Notes:
# Requires the 'WP fail2ban' plugin:
# https://wp-fail2ban.com/
#
# Author: Charles Lecklider
# Version: 6.3.0
# Build Date: 2026-10-25T19:01:13+00:00

wordpress-good.conf

Note

This filter is auto-generated.

# Fail2Ban filter for good failures
#

[INCLUDES]

before = common.conf

[Definition]

_daemon = (?:wordpress|wp)
_tail = (?: on <F-SITE_INLINE>\S+(?:/\S+)?</F-SITE_INLINE>)? from <ADDR>

failregex = ^%(__prefix_line)s(?:REST|XML-RPC) authentication success(?: \(repeat\))? for <F-ALT_USER>.*</F-ALT_USER><_tail>$ ; id=auth-api-success
            ^%(__prefix_line)sAccepted password(?: \(repeat\))? for <F-ALT_USER>.*</F-ALT_USER><_tail>$ ; id=auth-success

ignoreregex =

journalmatch = SYSLOG_IDENTIFIER=wordpress

# DEV Notes:
# Requires the 'WP fail2ban' plugin:
# https://wp-fail2ban.com/
#
# Author: Charles Lecklider
# Version: 6.3.0
# Build Date: 2026-10-25T19:01:13+00:00

wordpress-wpf2b-waf.conf

Note

This filter is auto-generated.

# Fail2Ban filter for wpf2b-waf failures
#

[INCLUDES]

before = common.conf

[Definition]

_daemon = (?:wordpress|wp)
_tail = (?: on <F-SITE_INLINE>\S+(?:/\S+)?</F-SITE_INLINE>)? from <ADDR>

prefregex = ^%(__prefix_line)sWAF\[blocked\] <F-CONTENT>.*</F-CONTENT>$

failregex = ^wp_delete_user\(<F-ALT_USER_ID>\d+</F-ALT_USER_ID>\)="<F-ALT_USER>.*</F-ALT_USER>"<_tail>$ ; id=waf-delete-user
            ^SQLi<_tail>$ ; id=waf-sqli
            ^update_option\(<F-OPTION_NAME>.*?</F-OPTION_NAME>\)="<F-OPTION_VALUE>.*</F-OPTION_VALUE>"<_tail>$ ; id=waf-update-option

ignoreregex =

journalmatch = SYSLOG_IDENTIFIER=wordpress

# DEV Notes:
# Requires the 'WP fail2ban' plugin:
# https://wp-fail2ban.com/
#
# Author: Charles Lecklider
# Version: 6.3.0
# Build Date: 2026-10-25T19:01:13+00:00