Real IP Cloudflare incorrect


I encounter a problem to show the real user IP address. I use the following code :


For some users (only few of them) the IP returned is not the correct one. I made a check with others website who provide ip informations (ipify, my-ip…)

This is the result for one of my customer who have the problem. There is a difference.


The result for “Serveur prive” my website, is different.

Pseudo-IPV4 is disabled.
IP V6 is disabled.

Do you have an idea to solve the problem ?

Best regards,

Do you have an idea ?

My idea is that the IP address is correct.

AS      | IP               | AS Name
15557   |    | LDCOMNET, FR

AS      | IP               | AS Name
47887   |    | NEU-AS, JO

The user could have been on their mobile, connected to a different network at the time or using a VPN. Cloudflare reports the IP address connected to it in that field, you can compare it against the x-forwarded for field for the same requests to be certain.

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