Web Servers on Unix and Linux - REMOTE_HOST different than apache error_log IP address

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > November 2005 > REMOTE_HOST different than apache error_log IP address





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author REMOTE_HOST different than apache error_log IP address
GS

2005-11-19, 5:49 pm


I was looking through my apache error log and saw an erroneous entry
for
one of my programs (apparently someone was trying to hack at it). In
my
entry program I capture the REMOTE_HOST env variable. I just happened
to see what REMOTE_HOST said and what apache logged as the IP address
and they were slightly different. I was expecting them to be EXACTLY
the same?

Can someone explain? Here's the exact numbers minus the first two
fields
which are identical noted by xx and yy:

xx.yy.7.132 is what is logged by apache
xx.yy.14.197 is what REMOTE_HOST says

Thanks.

Jeff Long

2005-11-22, 7:49 am

GS wrote:
> I was looking through my apache error log and saw an erroneous entry
> for
> one of my programs (apparently someone was trying to hack at it). In
> my
> entry program I capture the REMOTE_HOST env variable. I just happened
> to see what REMOTE_HOST said and what apache logged as the IP address
> and they were slightly different. I was expecting them to be EXACTLY
> the same?
>
> Can someone explain? Here's the exact numbers minus the first two
> fields
> which are identical noted by xx and yy:
>
> xx.yy.7.132 is what is logged by apache
> xx.yy.14.197 is what REMOTE_HOST says


From the CGI spec:

# REMOTE_HOST

The hostname making the request. If the server does not have this
information, it should set REMOTE_ADDR and leave this unset.

# REMOTE_ADDR

The IP address of the remote host making the request.

So supposedly xx.yy.14.197 is really the DNS name that xx.yy.7.132
resolves to? But I don't think legal DNS names can start with a number
so I can't say that is correct...

Jeff Long

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com