Forum Discussion
maruf_58474
Nimbostratus
Mar 05, 2009How to redirect to an ASM class with Irule
I am trying to use irule to send traffic to an ASM class, how do i do that? I am using version 9.4.6
I am trying something like
if IP equal x.x.x.x
send to a_p...
hoolio
Cirrostratus
Mar 06, 2009There is an existing request to add support for using source IP address/network as one of the filters on an HTTP class. This would allow you to configure your scenario without using an iRule. If you open a case with F5 Support you could get your request attached to the existing feature request.
In the meantime, you can use an iRule like this. The iRule assumes you already have the HTTP class added to the VIP with no filters. By default all traffic is sent to ASM and then the pool on the class or the pool on the VIP. Only requests from 1.1.1.1 are sent directly to my_pool.
when HTTP_CLASS_SELECTED {
Check if client IP address is 1.1.1.1
if {[IP::addr [IP::client_addr] equals 1.1.1.1]}{
Disable ASM for this client
PLUGIN::disable ASM
Send request to a different pool than the VIP's default pool
pool my_pool
}
}
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