WP_FAIL2BAN_PROXIES
Define trusted proxy servers.
Default setting: disabled
Added in version 2.0.0.
Changed in version 4.0.0: Entries can be ignored by prefixing with #
Changed in version 5.0.0: Added IPv6 support. Added “Unknown Proxy in X-Forwarded-For” message.
Specifies a list of trusted proxy servers. When defined:
If the remote address appears in the list, WPf2b will use the IP address from the X-Forwarded-For header
If the remote address is not in the list and there is an X-Forwarded-For header, WPf2b will return a 403 error
If there’s no X-Forwarded-For header, WPf2b will behave as if WP_FAIL2BAN_PROXIES isn’t defined
/**
* Define trusted proxy servers
*/
define('WP_FAIL2BAN_PROXIES', [
'192.168.0.42',
'192.168.42.0/24'
]);
Note
In the Premium version, the list is processed and cached for performance. If you update the list via the UI, the cache is automatically cleared. If you update using define(), you must clear the cache manually.
See also