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 192.168.1.111 80
redirector box nc -lvvp 80|nc -vv 192.168.1.222 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?
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 -;)