We have an application that listens on port 80, 443, and 808. We use http monitors which means instead of having a single 0 service pool each VIP has its own pool for the associated ports. We have a need to redirect requests from specific IPs to a isolated pool. But because there are three pools I have three irules and Im wondering how I can consolidate that to one that looks at source port and uses that to populate part of the pool name.
Here is what I have. Change the pool name for ports 443 and 808. Can I change to be something like pool -* and populate the * with the port the request came in on so I can have a single iRule?
when CLIENT_ACCEPTED {
switch [IP::addr [IP::client_addr] mask 255.255.255.0] {
"1.1.1.0" -
"2.2.2.0" {
pool www.site.com-80
}
}
}