File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Need to log client IP address in clustered environment
Joined: Dec 08, 2004
Apr 20, 2009 18:15:03
I need to log the client IP address of http requests made of a
In this case, the source of the http request is actually an F5 load balancer, but that device provides the original client IP as an http field. How can I get that information into the logfile?
I've tried to hunt down documentation, but have failed. If anyone can point me at relevant docs, that would be great. Or any clue would be helpful.
Many thanks in advance,
Kees Jan Koster
Joined: Mar 31, 2009
May 05, 2009 12:48:46
Here is a
discussion how to use the HTTP x-forwarded-for from code
. The code snippet is designed for use behind an Apache httpd, but it will work for an F5 big ip, provided it is configured to insert that HTTP header when it load balances your HTTP requests.
Java-monitor, JVM monitoring made easy
<- right here on Java Ranch
rocket mass heater
subject: Need to log client IP address in clustered environment
IP of the Client
client IP address
How to Obtain Remote IP Address
how can i get client IP?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013