How to prevent source IP from being published to Cloudflare?

The Cloudflare DNS settings page indicates 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 this is necessary for mail to work. How can I stop him from exposing my original IP address?

+8
security ip cdn cloudflare
source share
2 answers

CloudFlare redirects your traffic through its network, replacing the IP address in the DNS records with CloudFlare. This process works well in all situations except mail servers. CloudFlare does not offer any mail forwarding service and, as such, when you take an MX record and point it to the forwarded CloudFlare domain, CloudFlare will issue the server real IP address.

Instead, it’s better to use a third-party mail service (for example, Zoho, Google Apps, etc.), or your mail server is running on a different IP address. You can then point the MX record to a new record or a mail server not located on your computer and keep the real IP address safe.

Good luck.

+15
source share

1 out of 2 solutions:

  • Delete the MX record that CloudFlare uses. (Since they still do not use it.)

  • Replace the text of the MX domain (mail.example.com) with its IP address (44.123.12.44). Then CloudFlare WILL will replace it correctly.

I'm not sure why the IP addresses of mail servers should be completely secret. It's pretty easy to guess that example.com will often use mail.example.com. And by email you MUST know the address anyway ... otherwise it will not function.

-4
source share

All Articles