Solving problem with incorrect IP address detection

It's a crucial for the plugin to detect all IP addresses correctly.

In some rare cases, Cerber is unable to get IP addresses automatically due to hosting limitations or a non-standard server configuration. That means Cerber is unable to protect your website the right way and might even lock you out of your WordPress dashboard. First of all, use Getting Started guide to make sure that the plugin detects IP addresses correctly.

If you still unable to make the plugin get IP addresses correctly, you can define the CERBER_IP_KEY PHP constant in the wp-config.php file and the plugin will use it as a key to obtain IP addresses from the $_SERVER variable.

The step by step instruction

  1. Get your current IP address on the What is my IP address page
  2. Go to the Tools plugin admin page and click the Diagnostic tab
  3. Scroll down to the Server Info section
  4. Find your IP address in one of those strings that are displayed in the section
  5. In the left part of the string with your IP address you see a key in the square brackets. For instance, it can be: [HTTP_X_REAL_IP] =>
  6. Now you take this key HTTP_X_REAL_IP and add the following string with your key to the wp-config.php file
    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.

Last posts from WordPress security blog

I'm a team lead in Cerber Tech. I'm a software & database architect, WordPress - PHP - SQL - JavaScript developer. I started coding in 1993 on IBM System/370 (yeah, that was amazing days) and today software engineering at Cerber Tech is how I make my living. I've taught to have high standards for myself as well as using them in developing software solutions.

View Comments
There are currently no comments.