# Is this the solution for Cloudflare (free) + Mautic + Nginx (visitor's real IP)?

**URL:** <https://forum.mautic.org/t/is-this-the-solution-for-cloudflare-free-mautic-nginx-visitors-real-ip/17859>\
**Category:** Product Support\
**Created:** [January 20, 2021, 3:05pm UTC](https://forum.mautic.org/t/is-this-the-solution-for-cloudflare-free-mautic-nginx-visitors-real-ip/17859 "2021-01-20T15:05:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DavidSchargel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/davidschargel/32/2287_2.png) [@DavidSchargel](https://forum.mautic.org/u/DavidSchargel)\
**Post date:** [January 22, 2021, 6:46pm UTC](https://forum.mautic.org/t/is-this-the-solution-for-cloudflare-free-mautic-nginx-visitors-real-ip/17859/2 "2021-01-22T18:46:07Z")

</div>

I’m going to oversimplify this by saying that the same approach is taken for Cloudflare as it is on most reverse proxy or proxy services that are placed in front of an Nginx web server.

You need to properly set up Nginx via Nginx’s ngx\_http\_realip\_module module and you’ll need to whitelist the Cloudflare IPv4 addresses. You should also prevent IP leaks which need to you enable Cloudflare Authenticated Origin Pull certificates on your Cloudflare Full SSL enabled sites.

Sadly, this is not trivial on your own VPS and likely near-impossible on a shared host. In the end, it might just be safer to turn off the (orange) proxy that comes with the Cloudflare Free Plan.

---

_[View the full topic](https://forum.mautic.org/t/is-this-the-solution-for-cloudflare-free-mautic-nginx-visitors-real-ip/17859)._
