Before we start please make sure you have all of this :

1. SSH access to a Linux/Unix Server & the server have ruby installed
2. Putty SSH Client -> Download
3. SkyWizard@MyBSD pundek.rb (Our Proxy Daemon)
3. Know what you are doing :D

The purpose of this guide is to show you how to secure our connection via ssh tunnel same as having a secure proxy :). On this example we’ll be using Putty a window based ssh client to tunnel our connection to a remote proxy server so transparently we using the the proxy but via SSH tunnel.

We’ll start by configuring Putty to tunnel our connection:

Start your putty, By the way i assume most you guy already know how to use putty if you don’t try searching around first, I will not show you how to use putty here sorry:

Go to Connection -> Tunnels (refer to the figure below)

    Add the following 10:10:10.2:1234 to the destination and 7777 to the Source Port, and don’t forget to tick the option “Local port accept connections from others hosts” you should have something like this when you click the add button:

    go back to “Session” and enter your Linux/Unix hostname or IP and don’t forget to save your setting :) this step will conclude the client site setting. We can proceed to Server Side setting after this.

    SSH to your Linux/Unix server using the previous setting that we made:

    Now we need to get pundek.rb by Skywizard@MyBSD just type:

    wget http://staff.mybsd.org.my/skywizard/devel/pundek.rb

    Save it anywhere you feel like it, after you have what we need let us see what pundek.rb can offer us, run the proxy daemon by doing:

    ruby -w pundek.rb -h

    It should show something like this :

    It a straight forward program you can edit the files using “vi” to see it source code (if you want to). Let we start our proxy daemon by doing ruby pundek.rb without any option:

    well actually that the only thing we need I wont go through the detail how to use pundek.rb, next the last thing that we need to do is configure or web browser to use 127.0.0.1 port 7777 as a proxy the port maybe be different depend on your configuration and that it you are done you can now start browsing using your own secure ssh tunnel, I wont be showing how to configure your web browser to use custom proxy because if you are attempting to use ssh tunnel you should know how to configure your web browser already :mrgreen:

    Note:

    the remote proxy doesn’t need to be pundek.rb it can also use with squid or any sock 4/5 proxy available in the net

    This article is copyrighted by me and no one else :) please leave some credit if you are posting is somewhere

    Thank You