Forum Discussion

SandeepDV's avatar
SandeepDV
Icon for Nimbostratus rankNimbostratus
Jul 09, 2019

Set a Maintenance page for specific IP subnet.

I want to set a maintenance page if all the pool members are down, only for given IP subnet. I have created a datagroup with list of IP addresses L-IP.

Maintenance page is in base64 format. will the below rule works?

 

when HTTP_REQUEST {

  if { [active_members [LB::server pool]] equals 0 } {

if { [IP::addr [IP::client_addr] equals L-IP] }

     HTTP::respond 200 content [ b64decode [ base64code ] ] 

  }

}

1 Reply

  • You can put the subnet in a data group and then call it in the irule with the page you want:

    when CLIENT_ACCEPTED {
     
      Comparing a customer source IP to a list of entries in a LTM data-group.
     if { [class match [IP::remote_addr] equals data_SourceIps ] } {
       pool my_pool1
     } else {
       pool my_pool2
     }
     
    }