Permit 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 is down.
when HTTP_REQUEST { 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" } } }
I've set up a Datagroup list with the IP's in it. I just need assistance allowing only the ips in group to the site, while sending all others to the simple website down page. I have an irule for that also.