How to Run Your Own SSH Tunnel SOCKS Proxy Server

putty1

To download these tutorials for OFFLINE viewing or for archive purposes please (Click here to download)
(Clicking the “.zip” will open the Archive, un-zip the .mht files then use one of the plugins below to view them)

You can open .mht WebArchive files directly inside FireFox Or Google Chrome by installing a plugin


Blocked From viewing websites in the UK? cannot access them?
But have many friends in other countries who’s willing to help you?

Then why not get them to install their own SOCKS5 Proxy Server to allow you to connect directly to it.
You can then browse and surf the internet using their broadband connection! Or are you blocked from
accessing certain websites from work? Why not turn your home PC into a SOCKS5 Proxy server?

You can then tunnel into your home PC and use your home connection while at work!! or school!
Effectively bypassing your works/schools restrictions and your now back using completely free internet.
just as if you was sat at your home PC surfing the Web, And it’s super easy to do in a few steps!

Prerequisites

An unrestricted internet connection. Perhaps you have this at home (instead of school/work) or at a friend’s house.
A computer which you can leave turned on so SSH Server + Putty Tunnel can remain Active.

A Little note before we begin!

Before we install Putty client as our SSH Tunnel, We need to first install an Actual SSH Server you can connect too.
Remember you only install this SSH Server + Putty to tunnel traffic through on the actual destination server.
(In other words both these gets installed on the UN-restricted ISP PC’s you have at home or at a friends house)

Once it’s setup and working,  You then simply enter the IP Address of that server into your Web Browsers proxy settings box
This then forces all the data through that server address effectively bypassing all the network restrictions at your workplace.

Why am i explaining this? some guides online make it sound like the users who’s connecting to this proxy server
Are the ones who need to run the SSH + Putty software, This is not the case all any user needs to do is simply
Enter the IP Address/Domain of that server and port into their web browsers network proxy settings.

Setting up the SSH Server

There is many tools out there to use for this, Some Free some paid but for this guide we’re going to use
a FREE version called Copssh, So click here to download it. their is also another soft called CygWin if
you wish to use theirs instead then download and install their software instead by clicking here.

Great! Now you’ve installed your SSH Server, Now it’s time to ADD Putty this is very simple
This basically just allows us now to add an Encrypted tunnel into your SSH Server via HTTP://
Enabling Tunneling via Putty basically turns your generic SSH Server into a Socks5 Proxy.

Why would i want to do this? Well It encrypts and directs all data sent to/from your web browser
Directly through to your HOME PC running the proxy server, Not through your work networks.

Still UN-clear? very simple say you worked at pizza hut and you wanted to access hatebook
or twatter but their local network blocked their staff from doing such evil things well
tunneling will allow you to bypass ANY and ALL local restrictions even ISP Restrictions!

Sounds Great eh? i use it to tunnel through to a friends PC in the USA so i can access all the
blocked websites here in the UK, Since the USA ISP’s tell the content industry to go and jump!

The Wonderful Free Application called PuTTY.

Putty is a SSH Client but with so many features, Bells and whistles including the option to turn
your SSH Server into a SSH Tunnel Socks5 Proxy Server 🙂 so on we go!

Download and install PuTTY, there are other SSH clients and tools out there
that are designed specifically for SSH tunneling and SOCKS proxying but i love putty!!

Make a new directory at C:bin
Extract the contents of the putty archive into C:bin
An extra step that’s not really necessary- Add C:bin to your Windows system path.

Configuring Putty

Fire Up the application (C:binputty.exe) now remember this is on the same PC
that you’ve got a working SSH Server running on,So enter the hostname / ip address
that you normally use to access your SSH Server,(Example i access my Server at 192.168.1.103) on port 22

putty1

Now Click on Connection >> SSH >> Tunnels, In this option screen you need to
Tick “Dynamic” for the destination, Select an unused port on your system for the “Source Port”
For this were going to use 9999 and select “Add” That’s it done! it really was that simple so now click Open

A tunnel should now be in place. At this point you can basically tunnel anything through the tunnel
assuming it will allow you to specify a SOCKS proxy within that application.

Configuring FoxyProxy to Use Your Proxy Server

you must install and configure FoxyProxy on the computer with restricted internet access.

Create a new proxy definition by clicking the “Add New Proxy” button on the FoxyProxy Options dialog

foxyproxy

  1. Enter a name and optionally, notes, on the General tab, For example, under name you might enter “My Home Proxy”
    and under notes, “SOCKS5 proxy running at home again just an example”
  2. On the Proxy Details tab, select “Manual Proxy Configuration” In the SOCKS proxy field, enter the IP address 127.0.0.1 In the port field, enter the port under which you configured PuTTY to run which was in our example 9999 Convention is to use 1080 for SOCKS servers but you can use any port that isn’t already in use.
  3. Leave all other fields on the Proxy Details tab blank.
  4. On the Patterns tab enter URL patterns which match blocked URLs at your school/workplace.
    You can read more about patterns by clicking here.
  5. Change FoxyProxy from disabled to Use proxies based on their pre-defined patterns and priorities.

What if my unrestricted internet connection
has a dynamic IP address? how to connect?

If your ISP periodically changes your IP address as many cable/dsl ISPs do, get a free No-IP or DynDNS account. These services grant you a free domain name; for example, myproxy.bounceme.net. You run client software on your PC which “phones home” to DynDNS/No-IP every 30 minutes, informing them of your current IP address.