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

Bob_Z_148422's avatar
Bob_Z_148422
Icon for Nimbostratus rankNimbostratus
Apr 13, 2014

disconnect/teminate session if selected URI

Hi,

 

Is it possible in an iRule to disconnect or terminate a session if the URI matches some value?

 

I have a specific list of uris that I present/allow through my F5 and if I see something that is not one of them I don't want to send anything back to the user. I guess this is a sort of stealth mode web server.

 

Any help appreciated.

 

Thanks.

 

Bob

 

2 Replies

  • giltjr's avatar
    giltjr
    Icon for Nimbostratus rankNimbostratus

    You can have a iRule that sends a 302 redirect based on the URI in a request.

     

    What do you mean by "session?" If you mean the user is logged on, then the 302 redirect could be to the logoff page.

     

  • I have not checked the syntax because I have no BigIP nearby right now but this should work.

    allowed_uris is a string data group list containing all uris you want to allow
    
    when HTTP_REQUEST {
        if { not [class match [string tolower [HTTP::uri]] equals allowed_uris] }
            reject
            You can also use drop
        }
    }
    

    /Patrik