Forum Discussion

Philip_Jacob_69's avatar
Philip_Jacob_69
Icon for Nimbostratus rankNimbostratus
Jun 23, 2010

Reject httprequest on certain Cookievalue

We seem do have a scanner comming from many different Locations, trying to bring down our site with a series of http-Requests. They all have a spec. Cookie set.

 

 

Is it possible to reject these Requests by an irule, if for example the Value of the Cookie name "Apache" is "78689768967896".

 

 

Thanks for Ideas or solutions

 

Phil

 

 

 

3 Replies

  • Hi Phil,

    You can check for a cookie in requests and reject them if there is a specific value:

    
    when HTTP_REQUEST {
    
        Check for an apache cookie with a value of 78689768967896
       if {[HTTP::cookie apache] eq "78689768967896"}{
    
           Reset the connection
          reject
       }
    }
    

    Aaron
  • Hi Hoolio,

     

    I too have a similar doubt. The above iRule is for rejecting if apache has only one value (786xxxxxxxx). But is there any way i can add more than one value in a variable (apache) and every time i want to add a new value to the variable externally by not editing iRule.

     

    Thanks in advance Venkata