Why do my server logs show Cloudflare's IPs using Cloudflare?

When you sign on to Cloudflare the way your logs are displayed will change because Cloudflare acts as a proxy. This means that your visitors are routed through the Cloudflare network. This allows Cloudflare to stop attacks before they reach your network. It also allows Cloudflare to speed up page load time by more efficiently routing packets and, more importantly, caching static resources (images, javascript, css, etc.) on a very fast connection. However, as a result, the connecting IP will always come from the Cloudflare network.

Cloudflare reports the IP address of the visitor in an HTTP header it appends: CF-Connecting-IP, so there is some information on the original visitor. However in some instances where you have other programs that depend on the incoming IP address of the original visitor, there will be issues. The good news is that there is a solution which is outlined below.

This diagram helps explain more:

mod_cloudflare.png

Solutions for restoring original visitor IPs to server and CMS platforms

Still not finding what you need?

The Cloudflare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk