tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <parsonstechni...@earthlink.net>
Subject Re: logging remote IP address
Date Fri, 28 Jan 2005 03:29:35 GMT
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" <sendmailtomark@yahoo.com>
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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message