Get TrueIP without enterprise plan

We have a requirement to get the IP (IPv4) of the user using our system. We have not been able to get this using CF-Connecting-IP
We looked at the documentation here: developers.cloudflare/fundamentals/reference/http-request-headers/ and the only IP we can seem to get back is an IPv6 address.

We would like a suggested managed transform rule that returns the real IPv4 IP of our end user without upgrading to an Enterprise plan and using True-Client-IP

Welcome to the Cloudflare Community. :logodrop:

There seems to be a persistent, yet erroneous, belief that all devices have an IPv4 address. When a connection occurs over IPv6 there is no IPv4 address to obtain. Software developers need to stop relying on IPv4. We dont live in that world anymore.

There is no difference between the True-Client-IP and CF-Connecting-IP headers besides the name of the header.

5 Likes

We get that, but CF-Connecting-IP always returns a IPv6 and never a IPv4 for endpoints that we know have an IPv4 address. We are trying to figure out why.

IPv6 and IPv4 are two different IP protocols.

If the source of the traffic has both IPv6 and IPv4, but the actual connection to your server (or, in this case: to Cloudflare) is made over IPv6, there will literally be no IPv4, for that specific connection.

2 Likes

The Cloudflare proxy always accepts IPv6 connections, which means any vistors that have IPv6 will never connect with an IPv4 address to hostnames that are :orange: Proxied.

While insisting that your vendor fix their obsolete product design is the better idea, you may still be able to disable IPv6 using the API. This will make your site inaccessible to some vistors, but will allow the broken software that only works with IPv4 able to obtain visitor addresses in a manner that it understands.

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.