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

Fabou_139732's avatar
Fabou_139732
Icon for Nimbostratus rankNimbostratus
Jan 07, 2016

iRule for URL filtering not working as intended

I have configured the following iRule in the aim of only allowing clients to access version3 on server helilocal

when HTTP_REQUEST {
      if { !([HTTP::host] equals "helilocal") and !([HTTP::uri] starts_with "/version3") } {
            reject
      }
    log local0. "Request from [IP::client_addr] for [HTTP::uri] has been rejected."
}

I have applied the iRule to an HTTP VS but when I test it, I can browse to anything on the server. All the links below are working

Can someone tell what I am doing wrong?

4 Replies

  • Sorry to waste your time guys, I think I found my mistake as Devcentral's code highlight syntax clearly shows "reject" is a comment.

     

    I will remove the "" and test again tonight.

     

  • Sorry to waste your time guys, I think I found my mistake as Devcentral's code highlight syntax clearly shows "reject" is a comment.

     

    I will remove the "" and test again tonight.

     

  • Sorry to waste your time guys, I think I found my mistake as Devcentral's code highlight syntax clearly shows "reject" is a comment.

     

    I will remove the "" and test again tonight.

     

  • Sorry to waste your time guys, I think I found my mistake as Devcentral's code highlight syntax clearly shows "reject" is a comment.

     

    I will remove the "" and test again tonight.