| 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
|