# Only allow Cloudflare IPs for Discourse server

**URL:** <https://meta.discourse.org/t/only-allow-cloudflare-ips-for-discourse-server/70489>\
**Category:** Self-hosting\
**Created:** [21. September 2017 um 06:01 UTC](https://meta.discourse.org/t/only-allow-cloudflare-ips-for-discourse-server/70489 "2017-09-21T06:01:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)\
**Post date:** [21. September 2017 um 08:23 UTC](https://meta.discourse.org/t/only-allow-cloudflare-ips-for-discourse-server/70489/3 "2017-09-21T08:23:04Z")

</div>

> [@codinghorror](#):
>
> This does not matter; once your IP is exposed it can be attacked

Layer 7 attacks can be blocked in nginx by blocking everything but CF.

@Brock_Busby  
Here are some pointers, don’t know how to do it in Docker config though.

Make sure you are using an email provider, otherwise the emails will reveal your IP.

> **[Whitelisting CloudFlare in Nginx - Eric Helgeson](https://erichelgeson.github.io/blog/2014/01/18/whitelisting-cloudflare-in-nginx/)**
>
> I recently moved from Apache2 to Nginx as my web server of choice because of its low memory footprint so I can run it...

---

_[View the full topic](https://meta.discourse.org/t/only-allow-cloudflare-ips-for-discourse-server/70489)._
