public ip tool showing wrong info?
hey everyone, so we just launched our 'what is my ip' tool and some users are reporting that it's showing the wrong public ip address sometimes.
the core problem is that for a subset of users, especially those on mobile networks or behind certain VPNs, the displayed IP isn't their actual external IP. sometimes it's even an internal LAN address like 192.168.x.x, which is clearly not right.
what I've tried so far:
- i've checked our server logs and everything seems fine on that end.
- i've tested it myself using various proxies and VPNs, and i can sometimes replicate the issue, but not consistently.
- we're using standard headers like
X-Forwarded-ForandCF-Connecting-IP(we're behind Cloudflare), but it still seems to misidentify the actual public ip.
here's a dummy log snippet that kinda illustrates what we're seeing:
[2023-10-26 10:34:12] INFO: Request from 192.168.1.100 (Expected: 203.0.113.45)
[2023-10-26 10:34:12] DEBUG: Headers: {'User-Agent': 'Mozilla/5.0...', 'X-Forwarded-For': '192.168.1.100', 'CF-Connecting-IP': '203.0.113.45'}
[2023-10-26 10:34:12] WARN: IP mismatch detected. Reporting 192.168.1.100.my main question is, what could be causing this inconsistency? is there a more robust way to reliably detect a user's true public ip address, especially when dealing with complex network setups, CDNs, or mobile carriers?
really hoping for some expert advice here!
0 Answers
No answers yet.
Be the first to provide a helpful answer!