Forum Discussion
Mark_Givens_877
Nimbostratus
Oct 14, 2005iRule help with ports and pools
I need to create an iRule that will redirect incoming connections for certain ports to specific pools. I'm not sure how to do it. I found an example for something similar for v.4. I need to do the same thing but for v.9. I also need to specify a pool for more then one port. Using the 4.x example below, I would need Pool1 to be used if ports 4080 through 4085 were accessed. Is there a way to specify a range of ports instead of ==?
rule AppMgt {
}
if (ip_protocol == 6 and server_port == 4080) {
use ( Pool1 )
}
else if (ip_protocol == 6 and server_port == 5080) {
use ( Pool2 )
}
else if (ip_protocol == 6 and server_port == 9080) {
use ( Pool3 )
}
else {
discard
}
}
Thanks for the help!!
12 Replies
- Jessica_42876
Nimbostratus
thank ^^ for help me
in my case, i have to open ports 4900-49250
the iRole is
when CLIENT_ACCEPTED {
if { not ([TCP::local_port] == 4900 || ([TCP::local_port] >= 49000 && [TCP::local_port] <= 49250)) } {
reject
}
}
o.O ? . thank you ^^ - hoolio
Cirrostratus
That looks perfect. Nice work.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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