Forum Discussion
Craig_13855
Nimbostratus
Apr 02, 2009Redirect Traffic Based on Source Address
First of all, thanks to all you wizards out there that take the time to answer questions for us who are a little slower in the TCL world. I have found some great solutions on this site in the past but I cannot find my answer for this issue, which, to me, seems like would be straight forward.
I have 100's of clients hitting an URL which points to a VS on the BigIP. I don't want to go to each client and change the URL they go to based on what pool i want them to hit. What i would like to do is have an IRULE that states if the source subnet is subnet abc.efg OR hij.klm OR nop.qrs use this pool, otherwise (else) use this pool.
Can one of you wizards wave your wand and show me an example of how that would look?
- The_Bhattman
Nimbostratus
I think this is what you might be looking forclass myIPs { host abc.efg 255.255.255.0 host hij.klm 255.255.255.0 host nop.qrs 255.255.255.0 }
when CLIENT_ACCEPTED { if { [matchclass [IP::client_addr] equals $::myIPs] } { pool my_pool } else { pool alternate } }
- Craig_13855
Nimbostratus
Thanks for your quick reply. I tried that and got the following error; - Craig_13855
Nimbostratus
Never mind...i believe i have figured it out. I created the subnet list under the irules data group list. The irule took then.
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