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.

What would be a simple to use program for Windows that would do the following:

  • Computer A unknown TCP client wants to connect to computer B's unknown TCP server.
  • Both are behind a NAT.
  • Computer A has port forwarding available, and computer B does not.

I imagine I would need to install a program on A and B, and would have to run two instances: listener and facilitator. I am not sure what the program would be, but I think this would be how it works:

  1. Computer B starts their unknown TCP server
  2. Computer A starts the listener program on it's side
  3. Computer B starts the facilitator program on it's side, and computer B's facilitator program connects to computer A's listener program to be 'ready for connections'
  4. Computer A starts it's TCP client to connect to localhost where the listener program is running. Listener signals facilitator program should connect to unknown TCP server, and listener and facilitator handle the job of passing the data over the internet between the unknown TCP server and client.

Surely there is an 'app for that'? Is there one for Windows?

share|improve this question

1 Answer 1

Yes it exists, the most common implementation of this is SSH tunneling. Just set up computer A as the SSH host and forward the ports to computer B so it can talk to the server app on computer B.

There are SSH hosts for almost all operating systems.

So here are the steps

  1. Computer B starts their unknown TCP server
  2. Computer A starts a SSH server (the router is set up to port forward port 22 to computer A)
  3. Computer B runs a command similar to ssh user@12.23.45.67 -R 10000:192.168.1.10:7777 (replace 192.168.1.10:7777 with the ip and port of computer B and the TCP Servers's port, 12.23.45.67 is the public IP of Computer A)
  4. Computer A starts it's TCP client to connect to localhost:10000 (you can change the port by passing in a different first number to the -R switch on step 3). SSH port tunneling handles the job of passing the data over the internet between the unknown TCP server and client.
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.