Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent exposing origin IP address on Cloudflare?

On Cloudflare DNS setting page it state that An A, AAAA, CNAME, or MX record is pointed to your origin server exposing your origin IP address.

I have an MX record on my domain pointing to mail.mydomain.com. I believe it is something needed for the mail to work. How can I prevent it from exposing my origin IP address?

like image 737
user1995781 Avatar asked Apr 12 '16 05:04

user1995781


People also ask

Does Cloudflare hide your real IP?

Cloudflare hides your origin server IP addresses for traffic you proxy to Cloudflare. As an extra security precaution, we recommend contacting your hosting provider and requesting new origin server IPs. No, it shows the origin IP and it's shown when doing a lookup.

Where is IP behind Cloudflare origin?

Go to Censys search and simply enter the domain name you want to find the details about. You will instantly be able to see the true host along with the real IP address of the website. So, that's how you can find out the IP address of a website that uses Cloudflare services.

Does Cloudflare hide your location?

1: It Won't Hide your IP Address It does not hide users' IP addresses from the websites they visit.


1 Answers

CloudFlare forwards your traffic through their network by replacing the IP in DNS records with CloudFlare's IP. This process works well in all situation except mail servers. CloudFlare does not offer any service for forwarding mail and as such when you take a MX record and point it to a CloudFlare forwarded domain, CloudFlare will give away server's real IP.

Instead a better practice is to use a third party mail service (such as Zoho, or Google Apps, etc.), or have your mail server running on a different IP. You can then point the MX record to the new record or mail server not located on your machine, and keep the real IP hidden safely.

Good luck

like image 118
BinaryEvolved Avatar answered Sep 17 '22 14:09

BinaryEvolved