WPF2B_EVENT_BLOCK_COUNTRY_451

Attempted access from a country blocked with HTTP 451.

Premium only

Premium listener: WPF2B_EVENT_BLOCK_COUNTRY_451.

Premium emits this event when a request’s resolved country appears in WP_FAIL2BAN_EX_BLOCK_COUNTRIES_451. The request is denied with HTTP 451 Unavailable For Legal Reasons and receives a Link header pointing at the site as rel="blocked-by".

If the country also appears in the HTTP 403 list, that list takes precedence and Premium emits WPF2B_EVENT_BLOCK_COUNTRY instead.

syslog

Facility

WP_FAIL2BAN_EX_BLOCK_COUNTRIES_LOG

Level

NOTICE

Example

Blocked access 451 from country 'FR' on fqdn.example.com from 192.0.42.1

fail2ban

Filter

wordpress-hard.conf

Rule

Blocked access <F-HTTP_STATUS>\d\d\d</F-HTTP_STATUS> from country '<F-ISO_CODE>..</F-ISO_CODE>'<_tail>

EventData

country

ISO 3166-1 alpha-2 code

History

Added in version 6.0.0: Added F-HTTP_STATUS and F-ISO_CODE tags.