i rule for traffic redirection

Hi,

I need your help in writing on irule -

if the request is coming from x.x.x.x and y.y.y.y and z.z.z.z then go to pool A Else go to Virtual server B

Thanks.

Hi,

You can use the following irule or an ltm policy (http traffic) :

when CLIENT_ACCEPTED {
        if { [class match [IP::client_addr] POOL_A_IPS] } {
            pool pool_a
        } else {
            virtual virtual_server_b
        }
    }

POOL_A_IPS is a datagroup containing your IP addresses x.x.x.x, y.y.y.y and z.z.z.z

Hi,

You can use the following irule or an ltm policy (http traffic) :

when CLIENT_ACCEPTED {
        if { [class match [IP::client_addr] POOL_A_IPS] } {
            pool pool_a
        } else {
            virtual virtual_server_b
        }
    }

POOL_A_IPS is a datagroup containing your IP addresses x.x.x.x, y.y.y.y and z.z.z.z

You can also change the Event context for http traffic for example :

when HTTP_REQUEST {
    if { [class match [IP::client_addr] POOL_A_IPS] } {
        pool pool_a
    } else {
        virtual virtual_server_b
    }
}

You can also change the Event context for http traffic for example :

when HTTP_REQUEST {
    if { [class match [IP::client_addr] POOL_A_IPS] } {
        pool pool_a
    } else {
        virtual virtual_server_b
    }
}

Hi Yann,

You have been great help for many of my queries. I would test this one and update if it works.

Thanks

Hi Yann,

You have been great help for many of my queries. I would test this one and update if it works.

Thanks