Our 'What is my IP Address' Tool is Showing the Wrong Public IP Address, Any Ideas?

Author
Ji-woo Kim Author
|
4 days ago Asked
|
22 Views
|
2 Replies
0
hey everyone, so we have this super simple 'what is my ip adress' tool on our site, right? should be straightforward, right? well, lately, it's decided to develop a personality. it's acting like a moody teenager, just not doing what it's told. honestly, sometimes i think it's just messing with us. the core issue is, our tool has started showing completely wrong public IP address information for users, and it's particularly bad for anyone using a vpn or behind some tricky network configurations. it's just not reliably grabbing the client's actual external ip, which is kinda the whole point of the tool, you know? we're getting complaints left and right, people saying 'hey, your tool is broken!' and honestly, they're not wrong. we've tried a bunch of stuff to figure this out. first thing, we dove into the server logs, meticulously checking for those X-Forwarded-For headers, hoping to find some clues. also, we've gone through our cdn and proxy settings, specifically cloudflare, like a hawk, trying to make sure it's forwarding the correct ip address. we've even run extensive tests ourselves, trying it with different vpns โ€“ nordvpn, expressvpn, surfshark, you name it โ€“ and various isps, thinking maybe it was a specific provider causing the headache. but nope, the problem persists across the board. what we're seeing is pretty inconsistent too, which makes it even more frustrating. sometimes, it reports the cdn's ip address instead of the user's actual external ip. other times, it's even worse, giving back a completely internal network ip, which is justโ€ฆ useless for a 'what is my ip' tool. we're getting emails like 'your tool says my ip is 192.168.1.1, what gives?' and it's just embarrassing. users are clearly not getting their true public IP address and it's leading to a lot of frustration. so, i'm reaching out to this brilliant community for help. are there any common pitfalls we might be missing here? maybe some advanced server configurations on nginx or apache that we're overlooking? or perhaps a more robust api integration we should be using to accurately determine the true public IP address of the user, even through those really complex network setups and corporate proxies? we're really scratching our heads on this one.

2 Answers

0
Jamal Okafor
Answered 4 days ago

Hello Ji-woo Kim, regarding your 'IP address' tool (quick tip: it's 'address' not 'adress'!), for reliable client-side IP detection through complex network configurations, you might need to implement a solution leveraging JavaScript to query a STUN/TURN server via WebRTC, as HTTP headers alone are often insufficient for true public IP determination with aggressive proxy or VPN usage.

Have you explored client-side JavaScript for this specific purpose?

0
Ji-woo Kim
Answered 18 hours ago

The WebRTC STUN/TURN server idea is exactly what we needed, i should've asked sooner Jamal Okafor!

Your Answer

You must Log In to post an answer and earn reputation.