cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

iRule redirect based on IP subnet

Gregg_Freeman
Nimbostratus
Nimbostratus

Can anyone confirm if this iRule will work I am newbie to anything Big-IP. I am pulling what I can find here.

 

1 when CLIENT_ACCEPTED {

2   if { [IP::addr [IP::client_addr] equals 10.205.0.0/16] } {

3     pool MCGTWebSSL

4  } else {pool Default_Pool}

5 }

6 REPLIES 6

Sajid
Cirrostratus
Cirrostratus

My recommendation to use Local Traffic Policies

 

https://techdocs.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/local-traffic-policies-getting-started-12-1-0/1.html

 

0691T000008u8GzQAI.png

Please provide insight as to why using local traffic policies is a better solution that iRules? I have 150 subnets I need to create rules for.

  iRule looks good to me, it should work.

 

Mayur

Thank You

Gregg_Freeman
Nimbostratus
Nimbostratus

I need to add additional subnets to my iRule. Do I just copy and paste multiple instances of the rule I posted earlier. So just a repeat of lines 1-5 for each subnet or is there a better way? All subnets will be sent to the same pool and default_Pool.

May be use data group list?