Forum Discussion

Mark_Givens_877's avatar
Mark_Givens_877
Icon for Nimbostratus rankNimbostratus
Oct 14, 2005

iRule 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