4 ms·
how do you get my ip? gets my lan ip 192.168.99.4 instead of the internet address.
by eoyola 17y ago
how do you get my ip? gets my lan ip 192.168.99.4 instead of the internet address.
- JeremyChase 17y agoDoes your LAN use a proxy? I am doing this: @remote_ip = request.env["HTTP_X_FORWARDED_FOR"] I'm guessing that your 192.168.99.4 is being sent. The reason I grab this is because lighttpd is acting as a load balancer and I need the IP to find your location. Bummer about that.
- andresmh 17y agoThis is a problem I've encountered while building my own web app. There most be a way from PHP (or whatever else you're using) to know the real external IP of a user that comes to a site, isn't there? If anyone knows how to do this please let me know.
- JeremyChase 17y agoApparently X-Forwarded-For is an array that has all the proxies in it. Check out this page and we should be able to fix the problem. Thanks molo for the tip. http://en.wikipedia.org/wiki/X-Forwarded-For http://en.wikipedia.org/wiki/X-Forwarded-For