# EC2 Origin Exposed By Google Web Crawler With Discourse & CloudFlare

**URL:** <https://meta.discourse.org/t/ec2-origin-exposed-by-google-web-crawler-with-discourse-cloudflare/104521>\
**Category:** Self-hosting\
**Created:** [18 בדצמבר,‏ 2018,‏ 5:32am UTC](https://meta.discourse.org/t/ec2-origin-exposed-by-google-web-crawler-with-discourse-cloudflare/104521 "2018-12-18T05:32:56Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![TempusOwl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tempusowl/32/125537_2.png) [@TempusOwl](https://meta.discourse.org/u/TempusOwl)\
**Post date:** [18 בדצמבר,‏ 2018,‏ 5:32am UTC](https://meta.discourse.org/t/ec2-origin-exposed-by-google-web-crawler-with-discourse-cloudflare/104521/1 "2018-12-18T05:32:56Z")

</div>

I apologize if this is web hosting problem it was a toss-up, I am running the site on reverse NGINX proxy and the problem seems to be with Discourse side of things as my other site hosted on this server is unaffected. It appears the public DNS of AWS EC2 is being scanned by Google and this is exposing EC2 DNS / IP to others circumventing Cloudflare protection. For example, refer to the image below. In this case, it shows the landing page of the forum.

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/5/254608de87b99e9aee1d71787fe910df85c63892.jpeg)

I am not totally sure how to address this problem, I researched a few solutions with one being adding security groups in AWS to only allow Cloudflare IPs inbound to force Cloudflare only (seems like it would break things in my opinion). My concern is this solution may break reverse nginx and NGINX rewrite rules I have to expose true IP of users instead of the cloudflare IP with moderation and logging. Is this the correct solution or do or is there something I should look into fixing so discourse does not allow crawling under EC2s public DNS.

Guidance is Much Appreciated Thanks.

Edit: I found I was able to edit VPC rules and disable under “Edit DNS Hostnames” in VPC settings. I am unsure if this will solve the problem. Currently, the URL still points to my server, is this the right move? As per below I am now missing the public DNS which caused the problem above

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/0/40ec9a637d921fc9106c2df9d7da77cb06306999.png)

---

_[View the full topic](https://meta.discourse.org/t/ec2-origin-exposed-by-google-web-crawler-with-discourse-cloudflare/104521)._
