Simple HTTP tunneling from work to home


HTTP tunneling is a technique to hide a connection, say SSH, into a simple and harmless HTTP protocol. The point is that quite often SSH will be blocked by the the work firewall, even if you are using another port like 443 because it will see that what is really going through is SSH. By using HTTP tunneling, the SSH is encapsulated in an HTTP message. So most firewall will let it pass.

There are already many tutorial on how to do HTTP tunneling. But they usually apply to a 3 tiers configuration where you will use your home PC to access to a server on the Internet from work.

This tutorial covers the very simple case where you want to SSH to your home PC from work.

Example of a network configuration

  • Home WAN IP:
  • LAN IP of server you wish to connect to:
  • Open port on work firewall: 443 (HTTPS). I prefer to use this port instead of 80 so I can keep the later for plain Web Server access.

Software requirement

We need the GNU httptunnel package.


  • sudo apt-get install httptunnel



The server, the home PC:

  • sudo hts --forward-port 443

The client, the work PC:

  • htc --forward-port 2222

Note that sudo is only required when forwarding to a port below 1024.


To connect from the work PC to the home PC:

  • ssh localhost -p 2222

Short URL for this post:
blog comments powered by Disqus