X-Forwarded-For extraction in Apache RHEL 6.5 HOW-TO
Hello Guys
This should be a fairly easy question for the Gurus here
Im using SNAT on my Vip and I need to log the real IP address of clients for auditing reasons
Since I have always implemented BIG-IP in routed mode I usually don't have to care about this, but this time I had to use SNAT mode instead so this procedure of extracting the X-Forwarded-For header is fairly new to me
I have follow instructions outline here ( listed below): http://www.techstacks.com/howto/log-client-ip-and-xforwardedfor-ip-in-apache.html
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy SetEnvIf X-Forwarded-For "^......." forwarded CustomLog "logs/access_log" combined env=!forwarded CustomLog "logs/access_log" proxy env=forwarded
and also in the F5 article: https://support.f5.com/kb/en-us/solutions/public/4000/800/sol4816.html
but none of them seem to work...
Im a bit confused on where do I actually have to made config changes... whether the httpd.conf file or the ssl.conf file ( since all my traffic is actually SSL traffic) I did it on my http.conf file with no positive results
Im on Apache RHEL 6.5
Has anyone succeeded on extracting the real IP address from the X-Forwarded-For header
many thanks in advanced