HTTP Tunnel

Posted: March 27, 2009 in Open Source, Open Source Reference
Tags: , ,

HTTPTunnel is a simple client/server application for creating an HTTP tunnel between two machines, optionally via a Web proxy.

This is a small application for tunnelling an arbitrary TCP socket connection over HTTP. It can be used, for example, to tunnel traffic out from behind a restrictive firewall that only allows outgoing HTTP web connections.

The basic idea is that you run an instance of the HTTP Tunnel application locally in ‘client’ mode, that then connects out to another instance that you run at the remote end of the tunnel in ‘server’ mode.

You then connect to the local client end of the tunnel with the application whose traffic you wish to tunnel, and all communications are then wrapped in HTTP. The tunnel may also go via a HTTP proxy, either explicitly or transparently.

There are two programs: hts and htc. hts is the httptunnel server and htc is the client. hts should be installed on a computer outside the HTTP proxy, and htc should be installed on your local computer.

This program is mostly intended for technically oriented users. They should know what to do.

Having said that, here’s a (probably outdated) example:
At host REMOTE, start hts like this:
hts -F localhost:23 8888
At host LOCAL, start htc like this:
htc -F 2323 -P PROXY:8000 REMOTE:8888
or, if using a buffering HTTP proxy:
htc -F 2323 -P PROXY:8000 -B 48K REMOTE:8888

Now you can do this at host LOCAL:
telnet localhost 2323

and you will hopefully get a login prompt from host REMOTE.

Information and/or latest release should be available from these places:
http://www.nocrew.org/software/httptunnel.html
http://www.gnu.org/software/httptunnel/httptunnel.html
ftp://ftp.nocrew.org/pub/nocrew/unix
ftp://ftp.gnu.org/pub/httptunnel

See also
http://metalab.unc.edu/LDP/HOWTO/mini/Firewall-Piercing.html

which is a good introduction to firewall piercing. It also has describes one way to use httptunnel.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s