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

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

irule to reject requests based in uri

I am using the following irule to reject http::requests is the http::uri starts with "/source"

 

when HTTP_REQUEST {

 

if{[HTTP::uri] starts_with "/source" } { reject } }

 

Appending this to the virtual is rejecting all requests, remove this and the the virtual is working again. Any ideas anyone ?

 

2 Replies

  • Appending this to the virtual is rejecting all requests, remove this and the the virtual is working again. Any ideas anyone ?

     

    is there any error in /var/log/ltm?

     

  • Oh yes.... "b verify load" didn't show any errors but tailing /var/log/ltm showed the error

     

    local/tmm err tmm[4938]: 01220001:3: TCL error: test-exchange-rule - invalid command name "if{/" while executing "if{[HTTP::uri] starts_with "/source" } { reject }"

     

    changed the rule like this :

     

    when HTTP_REQUEST {

     

    if { [HTTP::uri] starts_with "/source" } { reject } }

     

    there should be space between if and the following { ........ now it works !! thanks for your help