reverse tunnel restricting ports

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I have a number of connections coming in to my host to create a reverse tunnel

from machine 1:
ssh -R:19991: -N -f

from machine 2:
ssh -R:19992: -N -f

From machine 3:
ssh -R:19993: -N -f

You can see that each user has a specific port that they should use.
I would either like to dynamically set the correct port on my host (I know what they should be), or if I cannot I would like to restrict the connections so that the users can only open the tunnel on the ports that I have specified.

Any suggestions on the best way to do this?

Site Timeline