A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
getting client IP address
Joined: Feb 16, 2005
Jul 29, 2005 10:20:00
while accessing client IP address we should use the fllowing method,
addr = request.getRemoteAddr();
If the client uses Proxy server then the sever gets the proxy IP Address, How can server gets exact IP number(Not Proxy).
Ex: The IP address of the system is 172.16.0.113, the proxy IP number is 172.16.0.200. when we the above methos we are getting 172.16.0.200, but we need 172.16.0.113.
Joined: Feb 05, 2001
Jul 29, 2005 10:28:00
Um, but isn't that the purpose of the Proxy, for protection. You wouldn't be able to get to the IP address of the machine directly anyway, you would always have to go through the proxy.
If you were able to get through then you could do some major damage to those personal machines, which wouldn't be good press for Java.
Or I could be wrong.
Perfect World Programming, LLC
Two Laptop Bag
How to Ask Questions the Smart Way FAQ
Joined: Feb 07, 2004
Jul 29, 2005 13:17:00
I think it's quite impossible, unless you have an
on client side, which can send you exact IP. For example my IP inside company 10.10.10.xx based, but all web sites report it as 192 something based.
Get power of your iPod with
| Minimal J2EE container is
Light weight full J2EE stack
| Co-author of "Windows programming in Turbo Pascal"
I agree. Here's the link:
- it saves me about five hours per week
subject: getting client IP address
client IP address
Returning the users IP address
Read Client IP Address behind Proxy
regarding proxy configuration
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013