Matt_Elkington
Sep 03, 2007Nimbostratus
Using REMOTE_ADDR
This is my first iRule :-), and the first service I have depoloyed behind a LTM.
We have a web application that uses the REMOTE_ADDR header to preform tracking, originally it was not behind a load balancer, so REMOTE_ADDR reported the actual client IP of the originating http request.
Now the web server (well web servers now :-) ) are behind a LTM, the REMOTE_ADDR header is reported as the internal floating IP of the LTM pair.
Now if I apply the following iRule to the service, will it report the correct REMOTE_ADDR, and will it still work?
when HTTP_REQUEST {
HTTP::header insert REMOTE_ADDR [IP::remote_addr]
}
Or would it be better to insert my own header and get the app guys to rewrite their application to use a custom header instead?
Such as
when HTTP_REQUEST {
HTTP::header insert REAL_CLIENT_IP [IP::remote_addr]
}
Many thanks in advance.