Kalpesh_48932
Jul 16, 2013Nimbostratus
x-forward-for irule
Hello Friends,
I have configured x-forward-for irule on my F5 and also it is enabled on HTTP profile. but it seems its not working cause on Apache server, we are getting only value of self IP, but not end client IP. I dont know why?
below is the script we have on Apache server
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\"" combined_forwarded
SetEnvIfNoCase X-Forwarded-For "." from_proxy=1
CustomLog /appl/liferay/logs/http-access.log combined env=!from_proxy
CustomLog /appl/liferay/logs/http-access.log combined_forwarded env=from_proxy
this script works well, when we access application without F5, but do not work when, connects to application via F5
Irule configured on F5 is
when HTTP_REQUEST { HTTP::header insert "X-Forwarded-For" [IP::client_addr] }
can someone suggest if any changes in Irule required to work with above apache sript?