Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have a computer with windows 7 under a firewall which can only initiate connections to other computers. It has a proxy server on it (port 9000) and I want to forward it to another machine ( using netcat.

Suggestions/ideas as to how to do it? My plan was to use something like

1) On the remote machine: nc -l -p 80 -e 'nc -l -p 9000'

2) On the firewalled computer: nc 9000 -e 'nc 80'

The problem is: it doesnt work. I would love to use putty's ssh2 port forwarding, but it is completely broken and the bug is there since 2003. I doubt it will ever be fixed.

share|improve this question
which bug? For me, it uses to work... – glglgl Nov 18 '11 at 8:04
This bug:… – user59067 Nov 18 '11 at 23:01

TCP tunnel (port forwarding) using Netcat

Here is how to establish a tunnel using netcat to a given host and port.

netcat -L -p 8080 -vvv

Listen on port 8080 of the server, and when somebody tries to connect, establish a link with (i.e.: SSH server).

netcat -L -p 25000 -vvv

Listen on port 25000 of the server, and when somebody tries to connect, connect him to Google web server.

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.