Skip to content

Instantly share code, notes, and snippets.

@chris-piekarski
Last active December 16, 2015 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris-piekarski/5421771 to your computer and use it in GitHub Desktop.
Save chris-piekarski/5421771 to your computer and use it in GitHub Desktop.
nc port forward examples
Will work once:
nc -l 0.0.0.0 6127
nc -l 6126 | nc 0.0.0.0 6127
wget http://0.0.0.0:6126
First 'nc -l' should hit.
Also works (once):
mknod backpipe2 p
nc -l 0.0.0.0 6124 0<backpipe2 | tee -a inflow | nc localhost 6125 | tee -a outflow 1>backpipe2
nc -l localhost 6125
wget http://0.0.0.0:6125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment