Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 3 down vote accepted

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."

share|improve this answer

You can turn off encryption in ssh by using the -c none option. I would do this then you can also turn it on later if needed without having to re-engineer your whole solution.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.