Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I've seen question "Windows HTTP tunnel through 2 Linux hosts?" and trying to learn something about the answers. I learned. I will start giving my problem, and then talking a little about my tests with answers of that question.

I'm trying to connect my windows host to a linux host, using a middle linux (the only one with external IP).

What's my problem:

My windows host doesn't have the ports I want open (game and traffic ports).

I have a linux host that have the ports I want open.

So, the problem would be solved if I could make a ssh tunnel through my windows hostto my linux host. The problem is that both of then only have an internal IP (one is on my company, another is on my university).

The salvation: I have acces to my company's linux server, that has an external IP (200.X.X.X).

So, I'd like to use this linux server as an intermediate though my windows host and my linux host.

The complicating: 

My linux server only has the port 110 open. I can only connect through ssh to it using the 110 port.

In other words: I'm needing an example such that I can make:

windows host's firefox, proxified to use localhost:9999

redirects its access to linux server,

that redirects its access to my linux host.

One (but not the only one) idea is reverse tunneling my linux host to my linux server, and then direct tunneling my windows host to my linux server, making this linux server redirect my windows host access to my linux host.

But I do not know the commands to try that.

I tried, but with no success:

linux host: ssh -R 20000:localhost:22 middle_user@200.X.X.X -p110

windows host: ssh -L 9999:localhost:20000 middle_user@200.X.X.X -p110

How can I do that?

My environment, in another words:

Windows host (internal IP == 10.X.X.X ; all ports open)

going through

Linux Server (external IP == 200.X.X.X ; can only connect using ssh to it on port 110, the port 110 is the only open)

redirecting windows host traffic to

Linux Host (internal IP == 192.X.X.X ; ports open, can connect using ssh on port 22)

Another addendum:

This would work if, on my linux server, I could (in a perfect world) access my linux host (what is impossible, given that I have an internal IP on my linux host)

windows host: ssh -L 9999:localhost:9999 -D 9999 -p 110 middle_user@200.X.X.X

linux server: ssh -D 9999 linux_host_user@linux_host_ip

share|improve this question
up vote 0 down vote accepted

Adapted from answer How to ssh to an unreachable remote machine by tunneling through a server that everyone can reach?

The "solution" that worked is:

  • on linux-user, I did ssh -R 1234:localhost:22 server_user@200.X.X.X -p110

  • on windows-user, I did ssh -L 1235:localhost:1234 server_user@200.X.X.X -p110


  • on windows-user, I did ssh -D 9999 -p 1235 linux-user@localhost

and then, on windows-user, I could configure firefox to use proxy socks localhost:9999, and could access a server running on my linux-user machine.

P.S.: For ssh on windows, I used cygwin to install openssh, to facilitate things.

share|improve this answer

Your Answer


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.