Forum Discussion
muzammil_88686
Nimbostratus
Nov 28, 2012iRule - Source Address and "X-Forwarded For"
Currently we are using the below iRule which is chekcing the "X-Forwarded-For" in HTTP header and 10.0.0.0/16 source address
===
when HTTP_REQUEST {
if {([HTTP::header exists "X-F...
Brian_Deitch_11
Nov 28, 2012Historic F5 Account
Let's see if this will work, I'm have a little trouble understanding the request:
when HTTP_REQUEST {
if {([HTTP::header exists "X-Forwarded-For"]) and ([string tolower [HTTP::uri]] contains "/wf/hp.me")} {
switch -glob [HTTP::header values "X-Forwarded-For"] {
"10.0*" {
HTTP::redirect "http://www.test.com/WF/H.me"
}
}
}
if { ([IP::addr [IP::client_addr]/16 equals 10.3.0.0]) and ([string tolower [HTTP::path]] starts_with "/wf"} {
HTTP::header insert X-Forwarded-For [IP::remote_addr]
HTTP::redirect "http://www.test.com/WF?sr=new"
}
if {[string tolower [HTTP::path]] starts_with "/wf"} {
pool Pool2
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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