socat 1.7.3.4 Open bidirectional communication channels from the command line

socat is a relay for bidirectional data transfer between two independent data channels---files, pipes, devices, sockets, etc. It can create "listening" sockets, named pipes, and pseudo terminals.

socat can be used, for instance, as TCP port forwarder, as a shell interface to UNIX sockets, IPv6 relay, for redirecting TCP oriented programs to a serial line, to logically connect serial lines on different computers, or to establish a relatively secure environment (su and chroot) for running client or server shell scripts with network connections.