//View Tip #33
» network copy with ssh and tar
» Permanent bash history
» Disable bash history
» Local/remote webserver
Listen on localhost:80, forward to localhost:81 and log both sides of the conversation to outflow, automatically restarting if the connection dies.
zod
Similar Tips
» Transfer files with netcat» network copy with ssh and tar
» Permanent bash history
» Disable bash history
» Local/remote webserver
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
mknod backpipe p; while nc -l -p 80 0<backpipe | tee -a inflow | \ nc localhost 81 | tee -a outflow 1>backpipe; do echo \"restarting\"; done
Listen on localhost:80, forward to localhost:81 and log both sides of the conversation to outflow, automatically restarting if the connection dies.
Comments
Add your comment
Comments are currently disabled
#1
socat -v TCP4-LISTEN:80 TCP4:localhost:81 will do the same and is way more readable
Posted 2009-04-03 08:22:59
So...
If I get it, which I might not, you're creating a fifo device and using netcat to port forward traffic from port 80/tcp to port 81/tcp, and you want to see the traffic too.
How does that relate to you title? Wireshark can't port forward.
As for zod's comment...well, I think your on the right track using nc. It's installed everywhere and a tip that needs you to install socat wouldn't be as useful.
If I get it, which I might not, you're creating a fifo device and using netcat to port forward traffic from port 80/tcp to port 81/tcp, and you want to see the traffic too.
How does that relate to you title? Wireshark can't port forward.
As for zod's comment...well, I think your on the right track using nc. It's installed everywhere and a tip that needs you to install socat wouldn't be as useful.
Posted 2010-09-19 12:42:35

