2

I'm working with Server running Ubuntu Server 14.04. I use Plink to request some reverse tunnels from a remote computer to the server.

For some ports that works just fine, but for most ports it seems like the server refuses the request. It works for ports that are regularly used for this application like the VNC port 5900, the RDP port 3389, and the MySQL port. It also seems to work for 5901-5999. I would like to get the other ports working too, but I can't figure out why it refuses those forwarding requests.

There are no custom rules in the IPtables and it is an almost clean install.

1

On the local side, ports under 1024 are privileged and you would need to run ssh as root to reverse forward a remote port to them.

On the remote side, sshd_config can lock down specific tunneling ports with the PermitOpen keyword. Also, you can not reverse forward a priviliged remote port without privileges on the remote machine (ssh as root@remote_machine).

A possible workaround is using nc or socat to forward ports without escalating ssh privileges or changing sshd_config.

  • Thank you for your suggestions. Sorry I forgot about this thread. It turned out that, (altough the network administrator assured me that this was not the case), all the traffic was just going through a firewall... – larzz11 Feb 17 '16 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.