Hacker News new | past | comments | ask | show | jobs | submit login

Does 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.




This 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.


Apparently 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




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: