Forum Discussion
swo0sh_gt_13163
May 03, 2015Altostratus
Hey Folks,
I got stuck again with the same issue, this time the iRule is a little complex than the one I asked earlier.
Following is the snippet for your reference.
when HTTP_REQUEST {
set FLAG_BLOCKED 0
set Disabl_ASM_FLAG 0
if {$GLOBAL_breakALL == 0}
{
if {[HTTP::uri] starts_with "/admin/content/"} {
if {[class match [IP::client_addr] equals AB_Web_Folder_IP]} {
log local0. "Access to admin is allowed"
ASM::disable
set Disabl_ASM_FLAG 1
} else {
log local0. "Someone trying to access /admin/content/ illegally from Source IP: [IP::client_addr] "
set FLAG_BLOCKED 1
set Disabl_ASM_FLAG 1
}
}
}
}
when HTTP_CLASS_SELECTED
{
log local0. "inside class selection"
if {$Disabl_ASM_FLAG == 1}
{
if { [HTTP::class asm] == 1 }
{
ASM::disable
log local0. "ASM is disabled now"
}
}
if {$FLAG_BLOCKED == 1}
{
reject
}
}
How can I eliminate the use of when
HTTP_CLASS_SELECTED
and HTTP::class ASM
?
Any help?
Thank you,
Darshan