Install and Configure httptunnel

Home / Install and Configure httptunnel

Install and Configure httptunnel

December 9, 2015 | Article | No Comments

httptunnel is free software that allows one to create a bi-directional tunnel encapsulated by HTTP, between client and server. The HTTP requests can be sent via an HTTP proxy if so desired. HTTP-encapsulated tunnels are useful behind restrictive network. If WWW access is allowed through a HTTP proxy, it’s possible to use httptunnel and, say, telnet or PPP to connect to a computer outside the firewall.

A common example of using this method is for using games, IM clients, or P2P sharing applications across restrictive firewalls or proxies which tend to block pretty much everything except well known traffic such as HTTP traffic.

httptunnel consists of hts (server) and htc (client) components to establish HTTP tunnels in between.

Installation

Linux Package Manager Way

For Debian or its derivatives system (Ubuntu, Linux Mint):

sudo apt-get install httptunnel

For Red Hat or derivatives system (Fedora, CentOS, Scientific Linux, etc), you should set up Repoforge repository first and then do:

sudo yum install httptunnel

Windows Way

Binary for Windows are provided by some contributors.

For Windows NT, you can go to here.

For WIN32, you can go to here.

Generic Way

Download the latest stable httptunnel source code (version 3.0.5) httptunnel-3.0.5.tar.gz

Extract the source code from archive, and do usual routine:

tar -xf httptunnel-3.0.5.tar.gz
cd httptunnel-3.0.5
./configure
make
make install

Set Up HTTP Tunnel

As stated before, there are two parties for a connection, which is http server and http client. Therefore, we need to configure both side. Of course, both should have httptunnel installed.

Server Side

hts -F <server_ip_addr>:<port_of_your_app> 80

The above command tells hts to listen on port 80 and redirect all traffic received on port 80 to ,port_of_your_app>

Client Side

htc -P <my_proxy.com:proxy_port> -F <port_of_your_app> <server_ip_addr>:80

The above command tells htc to receive traffic on localhost:<port_of_your_app>, which then is redirected to <server_ip_addr>:80, optionally via proxy (in case the client is behind HTTP proxy).

At this point, the application instances running on two end hosts can communicate with each other transparently via an HTTP tunnel.

, ,

About Author

about author

xathrya

A man who is obsessed to low level technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social media & sharing icons powered by UltimatelySocial