Forum Discussion
frisco76_104868
Nimbostratus
Jul 02, 2009Using X-Forward iRule and get Operation not supported
hi all,
I have the following iRule (see below) that generates the following error on some web pages:
Jul 2 09:58:14 tmm tmm[9998]: 01220001:3: TCL error: X_Forwarded_For_Client_IP - Operation not supported (line 1) invoked from within "HTTP::header insert X-Forwarded-For [IP::remote_addr]"
Now, this particular web page -- we have a rule above it in order that was redirecting from http to https. I thought that might of been the issue but I'm seeing this on another web page. I'm still think another rule might be stepping on it but I cannot say for sure.
I'm running version: BIG-IP 9.4.5 Build 1049.10 Final
Thanks in advance for your responses
** iRule **
5/15/09
rewrites the Client IP address into the REMOTE_ADDRESS field so IIS logs
can see the true client IP address and not the F5 IP address.
(NOTE: Must add ISAPI filter to the IIS web site and enable Insert XForwarded For
on the HTTP profile for this to work)
when HTTP_REQUEST {
HTTP::header insert X-Forwarded-For [IP::remote_addr]
}
- hoolio
Cirrostratus
I'd guess that the error is triggered when you attempt to insert the header and redirect on the same request. The XFF header insert can actually be done using an option in the HTTP profile. Using that and removing the header insert iRule would probably be the quickest fix for this. - frisco76_104868
Nimbostratus
Hi Aaron, thanks for the response. - hoolio
Cirrostratus
That's correct. - frisco76_104868
Nimbostratus
OK thanks Aaron. I ran wireshark and I see the X-Forwarded-For in my trace.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects