securesocketfunneling / ssf

Secure Socket Funneling - Network tool and toolkit - TCP and UDP port forwarding, SOCKS proxy, remote shell, standalone and cross platform

Home Page:https://securesocketfunneling.github.io/ssf/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to allocate random listening port in server side?

berkant opened this issue · comments

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.