Tunnel HTTP traffic encrypted, using Polipo and SSH

SSH can be used to do allot of great things. Login remotely, transfer files with scp and run single commands for a quick fix. All encrypted! Another great and well-known feature of SSH is SSH tunnelling.

SSH tunneling can be used to tunnel any kind of traffic, and in this guide I’ll focus on HTTP tunneling in conjunction with the proxy client Polipo (encrypted of course).

Things you will need:

  • Linux server
  • SSH daemon running on the server (openssh-server recommended)
  • Polipo daemon running on the server
  • SSH client (openssh-client recommended)

How to:

~$ ssh username@server -L 8118:localhost:8123 -N [Enter]
(Enter password)
Point your web-browsers proxy (Firefox, Chrome, etc) to localhost, port 8118

Syntax:

  • -L Specifies the remote address, remote port and local port ([local port]:[remote address]:[remote port])
  • -N Don’t execute any command on the remote machine when connected

Tunnel initiated!

2 responses to “Tunnel HTTP traffic encrypted, using Polipo and SSH”

  1. You may also want to add -C switch to SSH. It will add compression. Overhead is very little on modern CPUs, and acceleration is significant, especially on slower connections.

    BTW any particular reason for setup:
    internet – proxy – ssh tunnel – browser
    instead of (also possible)
    internet – ssh tunnel – proxy – browser
    with proxy on local machine?

Leave a Reply

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