More than one remote port fwd request for the same local port

Ming-Ching Tiew mingching.tiew at redtone.com
Fri Oct 31 10:10:35 WST 2008


Matt Johnston wrote:
> On Thu, Oct 30, 2008 at 02:37:44PM +0100, Michael Wiedmann wrote:
>> Hi,
>> 
>> how deals dropbear with different clients which are requesting each
>> a remote port forwarding to the same local port (on the server
>> side), e.g.  
>> 
>> system-1> dbclient -l user1 -N -R 7777:client-ip-1:80 server-ip
>> ...
>> system-2> dbclient -l user2 -N -R 7777:client-ip-2:80 server-ip
>> 
>> Doing a quick test it looks like dropbear accepts the client
>> requests but the port forwarding does not work (actually it cannot
>> because there is more than one 'target').  
> 
> Unix sockets inherently only allow a single process (so a
> single user) to listen on a port. What behaviour would
> you expect?
> 

I do face the same issue. In my usage, more than one system
execute the same command ( ie client-ip is actually one only )
and I don't run any remote shell, the sole purpose of the 
dbclient connection is to establish remote port forward, I 
would prefer the last command succeed and it drops the previous 
connection. However, I do realise  such a behaviour is rather
 "unfair".

Of course the other implementation is to fail the second
command. If there is not remote shell executed, then I 
would imagine this is a fair behaviour. However, what
happens if there is a remote shell to be executed and
it succeeds ? Should it be all or nothing, or should it be
as long as the remote shell succeeds ?

Since the second behaviour cannot really achieve what
I wish to achieve, so I have been keeping quiet about it.

Regards.





More information about the Dropbear mailing list