httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Schalk <werner_sch...@gmx.de>
Subject Re: [users@httpd] mod_rewrite: Overwriting REMOTE_ADDR with HTTP_X_FORWARDED_FOR
Date Fri, 24 Jun 2005 14:35:38 GMT
Hi,

well apologies for bringing this issue up again but none of the suggested 
solutions actually does work. I tried the following output filter:

ExtFilterDefine proxy_hack mode=output intype=text/html outtype=text/html 
cmd="/bin/sed 's/HTTP_X_FORWARDED_FOR/REMOTE_ADDR/g'"

Enabling this output filter in the appropriate vhost leads phpinfo to 
displaying the variable REMOTE_ADDR twice and containing both the private (IP 
of the internal Apache server) as well as the public IP address (which was 
forwarded by the proxy server). I wasn't sure about the order of 
HTTP_X_FORWARDED_FOR and REMOTE_ADDR so I tried this as well:

ExtFilterDefine proxy_hack mode=output intype=text/html outtype=text/html 
cmd="/bin/sed 's/REMOTE_ADDR/HTTP_X_FORWARDED_FOR/g'"

This will remove REMOTE_ADDR completely. I also tried to use mod_headers but 
that did not work at all:

Header unset REMOTE_ADDR
Header set REMOTE_ADDR %{HTTP_X_FORWARDED_FOR}e

That doesn't change REMOTE_ADDR at all like.

So I still don't have a solution. Any input is still greatly 
appreciated...Thanks for your helo guys!

Thanks and bye,
Werner

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message