Using Different ports based on client IP

I have a load balancer that sits in front of two servers. Currently http requests come into the load balancer on port 8888 and then are sent to Server A on port 8888 or Server B on port 8888.

I need to change this so the load balancer will send requests to Server A and B on port 7777 if the client ip is equal to a specified list of ip’s.

Hope that makes sense.

Thanks in advance for any help.

You just need to create a different pool on port 7777 and then select that pool when the client list matches. You can set up your IP list as a Data Group and then use matchclass to compare the client IP to the list. So something like this: (not syntax tested)

when HTTP_REQUEST {
  if {[matchclass [IP::client_addr] equals $::your_ip_list] }{
    pool 7777_pool
 }
}

Hope that helps,

Denny

DP,

Thanks, I will give it a try.