Forum Discussion
Chris_Wentland2
Nimbostratus
Nov 16, 2006Trying to parse a range of ports
Hello,
I'm trying to get a port range in an iRule working. We are evaluating the source of the request, then port, but this one is a little odd. We have one static port, and a range that ne...
hoolio
Cirrostratus
Nov 16, 2006Try removing the outer braces around each test and adding parens to the port ranges:
if { [TCP::local_port] == 21210 or ([TCP::local_port] > 9999 and [TCP::local_port] < 10500) } {
The square braces act like backticks in unix to execute the command inside. The parens can be used to set the priority for comparisons.
Also, I assume the second 'else {reject}' is a typo?
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects