Title: Cloudflare and Reverse Proxy
Last modified: August 19, 2022

---

# Cloudflare and Reverse Proxy

 *  [jacauc](https://wordpress.org/support/users/jacauc/)
 * (@jacauc)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/cloudflare-and-reverse-proxy/)
 * 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](https://wordpress.org/support/users/gioni/)
 * (@gioni)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/cloudflare-and-reverse-proxy/#post-15935422)
 * Hi! Please read this article about using CERBER_IP_KEY: [https://wpcerber.com/wordpress-ip-address-detection/](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](https://wordpress.org/support/users/jacauc/)
 * (@jacauc)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/cloudflare-and-reverse-proxy/#post-16016343)
 * 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](https://wordpress.org/support/users/jacauc/)
 * (@jacauc)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/cloudflare-and-reverse-proxy/#post-16016897)
 * 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 3 years, 8 months ago by [jacauc](https://wordpress.org/support/users/jacauc/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cloudflare and Reverse Proxy’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-cerber_77a9bf.svg)
 * [WP Cerber Security, Anti-spam & Malware Scan](https://wordpress.org/plugins/wp-cerber/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cerber/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cerber/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cerber/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cerber/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cerber/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [jacauc](https://wordpress.org/support/users/jacauc/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/cloudflare-and-reverse-proxy/#post-16016897)
 * Status: not resolved