• I’m using WP cerber on a site that is based behind a true reverse proxy with nginx, and I use cloudflare as a CDN

    I have enabled the reverse proxy toggle in the settings, but cerber only shows Cloudflare IPs in the activity log.
    I suspect this is because one could argue I’m behind two proxies (my own reverse proxy, and the CDN)

    Is there any way for Cerber to detect the true IP of the source user?
    My site’s IP own address is dynamic.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author gioni

    (@gioni)

    Hi! Please read this article about using CERBER_IP_KEY: https://wpcerber.com/wordpress-ip-address-detection/

    If you figure out that you need to configure NGINX, here what you can add to its config.

    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    Thread Starter jacauc

    (@jacauc)

    I’m unable to configure as proposed in the link you supplied because my IP is dynamic.
    I’ve tried adding the two lines into the nginx config, but then cerber detects all my traffic as originating from 0.0.0.0

    Any ideas?

    Thanks again

    Thread Starter jacauc

    (@jacauc)

    Think I may have fixed it… not sure if this is the right way, but I guess it does the job

    added the below into my wordpress config file:

    define('CERBER_IP_KEY', 'HTTP_CF_CONNECTING_IP' );

    • This reply was modified 2 years, 6 months ago by jacauc.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cloudflare and Reverse Proxy’ is closed to new replies.