Forum Discussion

Bryan_103012's avatar
Bryan_103012
Icon for Nimbostratus rankNimbostratus
May 17, 2010

irule syntax issue

Trying to build an irule to allow a range of ports. I'm a rookie at this. Got it looking good to the point it just says it needs a close brace, but thought I have one. Here's the syntax:

 

when CLIENT_ACCEPTED { if {not ([TCP::local_port] >= 7210 and [TCP::local_port] <= 7213 or \

 

drop}

1 Reply

  • Hi Bryan,

    If you want to drop requests made to a VIP port outside of 7210 - 7213, you can use this:

    
    when CLIENT_ACCEPTED {
       if {not ([TCP::local_port] >= 7210 and [TCP::local_port] <= 7213)}{
          drop
       }
    }
    

    Aaron