Results 1 to 2 of 2

Thread: netcat port redirection

  1. #1
    Just burned his ISO
    Join Date
    Jun 2006

    Default netcat port redirection

    I've been having a look at port redirection with netcat and am having some problem getting duplex communication accross the link. What I have so far done is outlined below:

    source box nc -nvv 80
    redirector box nc -lvvp 80|nc -vv 555
    target box - nc -lvvp 555

    so that I can connect to the redirector on port 80 which will then forward me on to port 555 (or whatever) of the target server.

    I can send text one way ie to the target successfully but not back from the target. Similarly I can't get a shell with "-e /bin/bash" due to nothing coming back.

    I've had a look on the net but not found anything useful that has worked for me yet. I do not have the -b (broadcast) option as one of the links I read suggested.

    Anyone have any ideas?

  2. #2
    Just burned his ISO
    Join Date
    Jun 2006

    Default answer

    OK - so seeing how nobodys answered this I think I may have found an answer taken from stearns .org website

    mknod backpipe p
    nc -l -p 80 0<backpipe | tee -a inflow | nc localhost 81 | tee -a outflow 1>backpipe

    This should work for forwarding traffic between port 80 and 81.

    Maybe this shouldnt be in the newbie section. dunno

    Oh well sorted now -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts