Forum Discussion
Ron_126046
Nimbostratus
Feb 24, 2014Permit specif IPs to pools, all others see a simple maintenance page
I have an iRule set up to redirect to specific pools depending on uri. Now maintenance is being done and only specific IPs need to be allowed to sites, all other get a simple web page that the site ...
Thomas_Gobet
Nimbostratus
Feb 25, 2014You can add the data group condition at the first line of your iRule.
For example :
when HTTP_REQUEST {
if { not ( [class match [IP::client_addr] equals my_ip_datagroup] ) } {
reject
}
switch -glob [string tolower [HTTP::uri]] {
"/jumper" {
pool tango.golf_TGIIS_Https_Pool
log local0. "redirect irule pool tango.golf_TGIIS_Https_Pool"
}
"/" - "/annie" - "/bugg" - "/charles" - "/dog" - "/fashion" - "/golf" - "/harry" - "/ink" - "/jonas" - "/kegg" - "/limber" - "/micro" - "/nosehair" - "/orange" - "/pinky" - "/queen" - "/romeo" - "/survey" - "/tango" - "/useless" - "/valve" - "/whiskey" - "/xray" - "/yonkers" - "/zulu" - "/poolball*" {
pool waterpolo_WPIIS_Https_Pool
log local0. "redirect irule pool waterpolo_WPIIS_Https_Pool"
}
default {
pool skijump_SKJWEB_Https_Pool
log local0. "redirect irule pool skijump_SKJWEBHttps_Pool"
}
}
}
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