I have the following irule that looks at matchclass “Ports” and sends that traffic to the default gateway member 69.74.121.60 and all other traffic to default gateway member 64.94.182.254, however, it seems that the irule is not functioning correctly - when I attempt an SSH/Port 22 connection outbound it sends the traffic to gateway member 69.74.121.60 and not member 64.94.182.254. Please look at the syntax and let me know how to improve it.
when CLIENT_ACCEPTED {
if { [matchclass [IP::client_addr] equals $::nonat_host ]} {
snat none
pool default_gateway_pool member 64.94.182.254
} else {
if { [matchclass [TCP::local_port] equals $::ports] } {
if { [LB::status pool default_gateway_pool member 69.74.121.60 0] equals "up"}{
pool default_gateway_pool member 69.74.121.60
} else {
pool default_gateway_pool member 64.94.182.254
}
}
}
}
class ports {
25
80
443
554
1080
1755
1863
3101
5050
5190
}