For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

A__N_5261's avatar
A__N_5261
Icon for Nimbostratus rankNimbostratus
Apr 15, 2014

Modify the IRULE

Hi,

We have already below IRULE for one of virtual server. Recently requirement we want to add some line in IRULE when LB see url with "/disk/disk.xml" it should drop

when HTTP_REQUEST { Pool name set thirdpool "pool3" set forthpool "pool4" set secondpool "pool2" set firstpool "pool1"

switch -glob [string tolower [HTTP::uri]] {
    "/abcfirst*"
    {
            pool $firstpool
        }
    "/_site*" -
    "//_site*"
    {
        persist cookie insert "SessMgt"
        pool $secondpool
    }  
    "/us-home*" -
    "//us-home*"
    {
        persist cookie insert "SessMgt"
        pool $thirdpool 
    } 
    "/blog*" -
    "//blog*"

    default {

        persist cookie insert "SessMgt"
        pool $forthpool 

    }
}

}

2 Replies

  • This should work for you:

    when HTTP_REQUEST { 
      Pool name 
     set thirdpool "pool3" 
     set forthpool "pool4" 
     set secondpool "pool2" 
     set firstpool "pool1"
    
    switch -glob [string tolower [HTTP::uri]] {
        "/disk/disk.xml*"
        {
            reject
        }
        "/abcfirst*"
        {
            pool $firstpool
        }
        "/_site*" -
        "//_site*"
        {
            persist cookie insert "SessMgt"
            pool $secondpool
        }  
        "/us-home*" -
        "//us-home*"
        {
            persist cookie insert "SessMgt"
            pool $thirdpool 
        } 
        default {
            persist cookie insert "SessMgt"
            pool $forthpool 
        }
     }
    }