Forum Discussion
RACQ_74493
Cirrus
Jan 04, 2011post about how to modify default pool behaviour
Hello,
I found a post on an irule to to send traffic to different pool based on URL and it also discussed how to change the behaviour of the default pool and I cannot find it.
I have an...
RACQ_74493
Cirrus
Jan 06, 2011Thank you Colin.
Your solution looks like a winner.
Now what if I want to also have an IP Address check to restrict access some of the URIs?
I would need some other global variable that can be read to denote a URI that has an extra check associated and then given that to perform the check for IPAddress.
So standing on the sholders of giants is my logic/syntax OK here?
when HTTP_REQUEST {
set myPool ""
set myURI_Restricted ""
set myClassIPAddressCheck ""
set myPool [class search -value myClassURI starts_with [string tolower [HTTP::path]]]
set myURI_Restricted [class search -value myClassURI_Restricted starts_with [string tolower [HTTP::path]]]
if {$myPool ne ""} and {myURI_Restricted ne ""}
if { ([class search -value myClassIP_Restricted equals [IP::client_addr]]} {
log local0. "Allowing [IP::client_addr] to $mypool pool"
pool myPool
} else {
drop
}
} elseif {$myPool ne ""}
pool $myPool
} else {
drop
}
}
class myClassURI {
"/apps/applytojoin" := "lpl_site1_https_applytojoin"
"/apps/applytonotjoin" := "lpl_site1_https_applytonotjoin"
"/apps/restricted" := "lpl_site1_https_restricted"
class myClassURI_Restricted
"/apps/restricted" := "Yes"
class myClassIP_Restricted
"66.102.11.0/24"
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