Forum Discussion
SSHSSH_97332
Nimbostratus
Jan 26, 2012Multiple IRules to same VS
i will do an Irule mentioned at the below link : but at the same time i want to forward to specific Pool based on src ip of client , will i do 2 Irules & then apply to the VS ? or it should only be o...
nathe
Cirrocumulus
Jan 26, 2012SSHSSH
I'd use 1 iRule - would this work? Oh and I've found a neat src ip irule example from hoolio. I take it you'll be forwarded a specific src ip to a different pool altogether? If so try this.
when CLIENT_ACCEPTED {
Save VS default pool name
set default_pool [LB::server pool]
Check if client IP is 1.1.1.1
if {[IP::addr [IP::client_addr] equals 1.1.1.1]}{
Select the second pool
pool second_pool
}
}
when HTTP_REQUEST {
switch [string tolower [URI::host [HTTP::uri]]] {
youtube.com -
www.youtube.com -
4shared.com -
www.4shared.com -
rapidshare.com -
www.rapidshare.com {
pool cache_pool
}
default {
pool $default_pool
}
}
}
N
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