Re: [users@httpd] mod_rewrite: Overwriting REMOTE_ADDR with HTTP_X_FORWARDED_FOR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux