Forum Discussion
RoutingLoop_179
Aug 16, 2013Cirrus
As AFanen said you can achieve this using standard LTM config. but you can also achieve using an irule you were pretty much there with your first one. If you want to load balance across your pool using 2222 need to create a pool using members using 2222, otherwise you can specifically specify individual pool members and ports. also I think you'll need to consider persistence since you are using SSH. Here's some code that may help.
when CLIENT_ACCEPTED {
if { [TCP::local_port] == 22 } {
log "ssh_server_pool with members 192.168.101.11:2222 192.168.101.12:2222 - using source address persistence"
necessary if not configured in the virtual server configuration - translate address from VIP to member - translate port from 22 to 2222.
translate address enable
translate port enable
load balance across pool
pool ssh_server_pool
as we're talking ssh we need to set a persistence profile
persist source_addr 255.255.255.255 0
log the localport
log "localport: [TCP::local_port] "
}
}
when SERVER_CONNECTED {
just for logging/debugging
log "serverport: [TCP::server_port] "
}
cont...