Why is my 'What is my IP Address' tool showing incorrect public IP for some users?
hey everyone, so we have this simple web tool, 'What is my IP Address', and it's been pretty stable for a while. but lately, we're seeing some really weird behavior.
the problem is that for a small percentage of users, our tool is returning an incorrect public IP address. instead of their actual home or office IP, it sometimes shows a datacenter IP, or an IP from a completely different region. it's really messing with user trust, and making our client IP detection look unreliable.
we're using a pretty standard request.ip type method in our backend, and it usually works fine. but for these specific cases, it's like the proxy chain or something is getting confused, which impacts the accuracy of our client IP detection.
here's what we sometimes see in our internal logs when this happens, showing an unexpected public IP:
[2023-10-26 14:35:01] INFO: User 123.45.67.89 (Expected: Home ISP) detected as 104.28.X.X (Cloudflare CDN)
[2023-10-26 14:35:02] WARN: Geo-IP mismatch for session XYZ. Reported IP: 172.217.Y.Y (Google Datacenter), Client IP: 203.0.113.Z (Unknown)has anyone else faced issues with accurate public IP detection, especially with users behind VPNs, specific ISPs, or perhaps even certain mobile networks? are there better ways to ensure we're getting the true client IP? help a brother out please...
0 Answers
No answers yet.
Be the first to provide a helpful answer!