Mailing List Archive

%ENV
Hi,

>Normaly HTTP_X_FORWARDED_FOR variable points to clients IP and
>REMOTE_ADDR to proxy IP if request is via proxy.
>Situation:
>trough proxy:
>HTTP_X_FORWARDED_FOR is unset
>REMOTE_ADDR points to the IP of the proxy server
>
>Did anybody know workaround for this situation?
>I want to get the clinets IP when the user uses proxy server.

If you are using the Apache proxy, search the mod_perl mailing list archive.
There is a module that does set the HTTP_X_FORWARDED_FOR

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
RE: %ENV [ In reply to ]
Hi Gerald,
Thanks for replay.
I use squid as proxy server. I think the problem not in proxy.
When I print environment from a CGI script all seems be OK.
On server side I use apache with SSL and the "user" connect
to this site through squid proxy. And in this situation appears
the described problem. When the "user" connects without using squid proxy
everything is OK.
You should see the same Environement under Embperl as under CGI. If this is
not the case for whatever reason and you running under mod_perl you can you
the $req_rec -> headers_in method to get the information.

You also may set dbgHeadersIn and/or dbgEnv and take a look at the Embperl
logfile, if the x-forwarded-for header is really send by the proxy (squid,
of course should do so)

Gerald

P.S. Please answer also to the list, so other can participate







Gerald Richter wrote:

Hi,
>Normaly HTTP_X_FORWARDED_FOR variable points to clients IP and
>REMOTE_ADDR to proxy IP if request is via proxy.
>Situation:
>trough proxy:
>HTTP_X_FORWARDED_FOR is unset
>REMOTE_ADDR points to the IP of the proxy server
>
>Did anybody know workaround for this situation?
>I want to get the clinets IP when the user uses proxy server.

If you are using the Apache proxy, search the mod_perl mailing list
archive.
There is a module that does set the HTTP_X_FORWARDED_FOR

Gerald

-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------

--
Krassimir Slavchev Bulinfo Ltd.
krassi@bulinfo.net (+359-2)963-3652
http://www.bulinfo.net (+359-2)963-3764