If what you are trying to see is the private IP of a machine then you will only have success if the machine was named the IP. Not likely. The IP is not stored in the HTTP header (Unless I missed it) but is derived from the TCP/IP packet. When a machine is on a private network this address is rewritten by the "router" the provides NAT or PAT translation.

The one IP that is returned is the IP given by the "router". Or is the actual IP of the machine.

If I misunderstood what you needed let me know.

Doug

----- Original Message ----- From: "Mark" <[EMAIL PROTECTED]>
To: <tomcat-user@jakarta.apache.org>
Sent: Thursday, January 27, 2005 3:28 PM
Subject: logging remote IP address



Hi,
Can anybody help how to log remote IP internal address using catalina
logger (org.apache.catalina.*) classes and Http request class?

request.getRemoteAddr() returns only one IP, but I'd like to see if
the request came from subnewtwork or not:

I'm looking for both values external IP and internal so my log will
look like:

200.200.200.200 (192.168.1.2) - - [5/Jan/2005:15:56:23 -0500] "GET
/test/index.jsp HTTP/1.0" 200 354

Thanks,
Mark.



__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to