Forum Discussion

Jinshu_134425's avatar
Jinshu_134425
Icon for Nimbostratus rankNimbostratus
Feb 26, 2016

How to block URI in ASM

Hello,

I am trying to configure a wildcard entry for URI whihc nees to block

/myservices/admin/*
. This means anything which comes after
/admin
should get blocked.

I have tried in disallowed URI but it is only allowing explicit values. How can we configure '

*
' in this. Please help.

-

1 Reply

  • I have solved the issue now.

    I have created below irule and enabled irule event in ASM policy. Also i have created a custom violation named as

    Illegal_Url_Access

    when HTTP_REQUEST {
      set reqBlock 0
      if { ([[string tolower [HTTP::uri]] contains "/myservices/admin")} {
      set reqBlock 1
      }
    }
    
    when ASM_REQUEST_DONE {
      if { $reqBlock == 1} {
        ASM::raise Illegal_Url_Access
      }
    }
    

    -Jinshu