# 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:** [9월 21, 2017, 6: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:** 6

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [9월 21, 2017, 4:41오후 UTC](https://meta.discourse.org/t/only-allow-cloudflare-ips-for-discourse-server/70489/6 "2017-09-21T16:41:09Z")

</div>

Look at how `./templates/cloudflare.template.yml` downloads the IP list and constructs `set_real_ip_from` from that list.

So you’d copy or modify that file to also generate `allow` directives, and add a `deny all;`.

---

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