Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a very limited understanding of computer networking, so my terminology will probably be incorrect in places, but let me try to explain the situation as clearly, general, and accurately as possible.

The set-up is as follows:

An Application with native socks support is configured to connect to a proxy server listening locally (the proxy server in this case is PuTTY with dynamic tunnel enabled), which tunnels via SSH to a remote server that, in turn, connects to the destination.

This works fine when the software on the local machine is acting as a client, i.e. it is initiating the connections, but if the software needs to receive incoming connections, it does not work because connections are made to the remote tunnel server, which does not know what to do with said connections and subsequently drops them.

The remote server and local server are running GNU/Linux and Windows respectively.

My question is, how can I make it so that the remote tunnel server forwards connections it receives on a certain port to my local machine? Preferably over the existing SSH connection if possible.

share|improve this question
    
What about setting up a VPN and forwarding incoming connections to local machine's VPN IP? –  dusty Mar 5 '11 at 16:50

2 Answers 2

up vote 1 down vote accepted

ssh calls this a "reverse port forwarding"; in OpenSSH this is the -R command line option, in PuTTY this is done by selecting the "Remote" option for the port forwarding. Note that the ssh server must gave GatewayPorts yes in its sshd_config for other machines to be able to connect to the forwarding socket on the remote.

share|improve this answer
    
Thanks, works perfectly. –  a-- Mar 6 '11 at 0:01

You don't seem to have a "very limited understanding of computer networking". TCP connections should work fine over a socks tunnel. But if the application uses UDP, that won't work over the tunnel without a more sophisticated setup. What application is it that you're trying to use over the tunnel?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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