Netcat

command-line tool; kann sowohl als server als auch als client agieren

client:

aufruf: netcat (host) (port)

wie telnet

server:

"listen"-mode

aufruf: netcat -l -p (port)

proxy:

Bidirektionale Verbindung:

  $ mknod backpipe p
  $ netcat -l -p 2525 0<backpipe 1="" 25="" iem.at="" netcat="" |="">backpipe

Bidirektionale Verbindung (mit logging):

  $ netcat -l -p 2525 0<backpipe -a="" 1="" 25="" iem.at="" inflow="" netcat="" outflow="" tee="" |="">backpipe

UDP-proxy:

ssh erlaubt einen TCP-tunnel, aber keinen UDP-tunnel; daher UDP->TCP->UDP tunnel mittels netcat (s.a. hier)

terminal 1:

    local:~$ ssh -L 6667:localhost:6667 tcpserver.org
    remote:~$ mkfifo /tmp/fifo
    remote:~$ nc -l -p 6667 &lt; /tmp/fifo | nc -u udpserver.org 161 &gt; /tmp/fifo

terminal 2:

    local: ~$ su
    local: ~# mkfifo /tmp/fifo
    local: ~# nc -l -u -p 161 &lt; /tmp/fifo | nc localhost 6667 &gt; /tmp/fifo
</backpipe></backpipe>