Forum Discussion
iRule for Swapping XFF with Something Custom(Microsoft)
What is the syntax for a simple iRule that takes a standard X-Forwarded-For header and rewrites it to a different header name. I have a WAF in front of an LTM, which is in front of an ADFS Proxy environment, which does not use the XFF header, but uses instead "X-MS-Forwarded-Client-IP". The WAF will send a standard XFF header, but then I need the f5 to rewrite it to something the ADFS Proxies can parse.
Example, f5 will receive:
X-Forwarded-For: 1.1.1.1
I then want the f5 to rewrite to:
X-MS-Forwarded-Client-IP: 1.1.1.1
Thanks all in advance for your help!
- wralon
Nimbostratus
I have tried the following, but it does not seem to be working....
when HTTP_REQUEST {
if {[HTTP::header exists X-Forwarded-For]}{
HTTP::header insert X-MS-Forwarded-Client-IP [HTTP::header X-Forwarded-For]
} else {
HTTP::header insert X-MS-Forwarded-Client-IP [IP::client_addr]
}
}
- ryank5589
Nimbostratus
Hey, I was wondering if there was ever a resolution to this issue? I am also running into the same issue where I need to see the X-MS-Forwarded-Client-IP due to the traffic going to the ADFS proxy environment and it not being able to accept the XFF.
Recent Discussions
Related Content
* 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