Is there any way that I could get the original IP address of the client coming to the server?
I can use request.getRemoteAddr()
, but I always seem to get the IP
request.getRemoteAddr()
is the way. It appears your proxy changes the source IP. When some proxies do that they add the original IP in some custom http header. Use request.getHeaderNames()
and request.getHeaders(name)
and print all of them to see if there isn't anything of interest. Like X-CLIENT-IP
(made that one up, but they look like this)