Solving problem with incorrect IP address detection
It's a crucial for the plugin to detect all IP addresses correctly.
In some rare cases, WP Cerber is unable to get IP addresses automatically due to hosting limitations or a non-standard server configuration. That means WP Cerber is unable to protect your website the right way and might even lock you out of your WordPress dashboard. First of all, use the plugin’s Getting Started Guide to make sure that the plugin detects IP addresses correctly.
If you are still unable to make the plugin detect IP addresses correctly, you have to define a special CERBER_IP_KEY constant in the wp-config.php file. The plugin will use it as a key to obtain IP addresses from the $_SERVER variable.
Please follow these steps
- Get your current IP address on the What is my IP address page
- Go to the Tools admin page which is under the WP Cerber admin menu and click the Diagnostic tab
- Scroll down to the Server Info section
- Find your IP address in one of those lines that are displayed in the section
- In the left part of the line with your IP address, you see a key in the square brackets. For instance, it can be:
[HTTP_X_REAL_IP] => 222.214.171.124.
- Now you have to take the key
HTTP_X_REAL_IPand add the following string (with your key) to the beginning of the wp-config.php file (after the line with <?php)
define('CERBER_IP_KEY', 'HTTP_X_REAL_IP' );
Note: The HTTP_X_REAL_IP is shown as an example, you have to find out and use your own key.