HTTP_CF_PSEUDO_IPV4 give the wrong IP


I installed Cloudflare and my main issue are to get th real IPV4. When I check my IP HTTP_CF_PSEUDO_IPV4 return ["HTTP_CF_PSEUDO_IPV4"]=> string(15) "" and that’s not my IP.

Why it’s doesn’t work?


Pseudo IPv4 just makes up a unique IPv4 address for your visitor.

Are you also getting the CF-Connecting-IP or X-Forwarded-For headers?

Yes, but in some cases it’s gave me an IPV6 and I depend on some services that need IPV4.

If the real visitor IP address is IPv6, then you’ll have to fall back to that Pseudo IPv4 header. Does it break anything if you just use the Pseudo IPv4 for everything?

the Pseudo IPv4 isn’t right like a said it’s gave me for me

It’s a pseudo. It just enables the ability for ipv4 applications to communicate with v6 clients and not to identify the visitor. Basically like 6to4 or 6in4.

Or did I miss something? :thinking:

1 Like