Ubuntu: Compressed, but not encrypted, tunnel for TCP

compressionstunneltcptunnelingUbuntu

How can I set up a tunnel for TCP connections between two hosts so that I can test a few different compression algorithms?

I'm aware of stunnel & SSH, but want to avoid the overhead of encryption. To avoid TCP-in-TCP flow issues, UDP as the transport is fine.

Basically, at the source and destination, I'd like to try piping the TCP data-stream through a few of the widely available compression programs. (gzip, bzip2, lzma, lzo, etc..)

How can this be done? (Using Ubuntu 10.10)

Thank you

Best Answer

I think netcat is perfect for this situation.

"Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol."

http://netcat.sourceforge.net/

http://en.wikipedia.org/wiki/Netcat/