securesocketfunneling / ssf

Secure Socket Funneling - Network tool and toolkit - TCP and UDP port forwarding, SOCKS proxy, remote shell, standalone and cross platform
https://securesocketfunneling.github.io/ssf/
Other
1.59k stars 235 forks source link

How to allocate random listening port in server side? #78

Open berkant opened 5 years ago

berkant commented 5 years ago

I have begun taking up ssf instead of OpenSSH for the reason it's pretty much lightweight as it uses async i/o and multithreading. I'm getting up hundreds of LXC containers behind NAT for reverse tunneling but I have to randomly assign ports on server side, which is currently malfunctioning in ssf. For example I run the command below in NAT instances:

ssf -F 0 <public_ssfd_ip>

which says it has allocated 127.0.0.1:0 on server side and when I inspect the listening ports of ssfd using netstat, I can clearly see it's allocated a random ephemeral port as OpenSSH does but this port doesn't work.