Our application needs the original IP as we have several services that can only be accessed by certain IP ranges.
As far as I understand, Cloudflare does only pass on the original client IP with the “Enterprise Plan” (Feature True-Client-IP Header). But our application budget can not afford that plan and i wonder whether other possibilities exist. I don’t need all features from Enterprise, I just need PRO + this IP feature.
I just logged what I get from cloudflare requests:
cfCountryCode=CH → correct!
cfIP=243.201.173.220 → not correct, this is a Cloudflare IP, not mine!
cfIPv6=2a02:168:4b32:0:2d20:41c6:6064:19da → not correct, this is the IPv6 of a cloudflare server in France
So on any non-Enterprise plan, you won’t get the original client ID! This sucks,
As I said (and was in the link), you need to use the CF-Connecting-IP header to get the client IP address. I do so on sites from free to enterprise (as well as restoring visitor IPs) as do most people. It does work.
True-Client-IP is a HTTP request header that contains exactly the same value of CF-Connecting-IP but under a different header name. Its mainly only used by customers migrating to Cloudflare from Akamai who are unable to change their backend systems.
This isn’t a Cloudflare IP… it’s likely yours. If you’re connecting via IPv6, there is no IPv4 address to report. Disable Pseudo IPv4 it’s specifically designed to provide a ‘fake’ IPv4 when a user connects via IPv6 for systems that can’t grok IPv6.