Forum Discussion
Chad_Roberts_21
Dec 01, 2006Nimbostratus
I think the only thing wrong with your iRule is that you're using [IP::remote_addr] instead of [IP::client_addr]. Be definition, you're using the end IP, not the start.
However, if you're trying to add this header to ALL traffic on that virtual server without putting in any additional logic, you'd be better off simply adding the header in the HTTP profile. There is a "Header Insert" option there where you could place it instead. Instead of the syntax you used above, I believe it would be
ORIG_CLIENT_IP:[IP::client_addr]
(Edit - I mistyped the one above the first time. Oops...)
Also, note the option in there called "Insert XForwarded For." This does the exact same thing you're trying to do, except the name of the header is "X-Forwarded-For" instead of "ORIG_CLIENT_IP".