I am trying to setup SSH Tunnels with multiple IPs on a machine with just one network interface card. The extra IPs are setup as alias venet0:0, venet0:1, venet0:2.. I can setup the SSHD to listen on all the IP addresses and it will accept incoming connections on all the IPs. The problem is that all the outbound traffic will go through the IP on venet0:0.

I tried configuring so that each IP will listen on a different port, but problem still exist. Doesn't matter which IP the client is setting up the SSH tunnel with the outgoing traffic from the server is still going through the IP on venet0:0

Is there a way that I can set it up so that the client establishing the SSH tunnel on IP1 will have all the forwarded traffic going out through IP1 and IP2 will go out through IP2.

Do I have to start multiple instance of the SSHD server? One for each IP?