Forum Discussion
Kai_Wilke
Aug 04, 2016MVP
Hi Zhangyuyao,
there is no need to switch into the client side context if you are already in the client side context. Using the
[clientside]
/ [serverside]
command is just required in those usecases where you need to execute client side command in the server side context or a serverside command in the client side...
Try the irule below... it should be able to query the local portnumber and perform the
[pool]
/ [virtual]
routing decission based on it.
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 114.255.174.240] } then {
if { ([TCP::local_port] >= 10069) and ([TCP::local_port] <= 10124) } then {
virtual VS_4809_Troubleshooting_443
} elseif { ([TCP::local_port] >= 11069) and ([TCP::local_port] <= 11124) } then {
virtual VS_4809_Troubleshooting_80
} else {
pool pool_4809_Troubleshooting_443
}
}
}
Note: You can still issue the
command, but there is really no need to do so in the [clientside { TCP::local_port }]
event.CLIENT_ACCEPTED
Cheers, Kai