Saturday, June 8, 2013

Feeling Paranoid Much? Surf Anonymously Using Secure Shell (ssh)

by Dietrich Schmitz

Seems that we have all caught the paranoia fever which is going around (cough NSA).

I think the level of concern is sufficient and justifiable that puts everyone's Internet Privacy into question.

So, expect my stories to continue to take a bent on security and privacy and what measures can be taken by you to be proactive in seizing control of some aspects of your Internet Privacy.

Not surprisingly, the reality of obtaining true privacy on the Internet requires a mix of technologies, but all have one common denominator: encryption. (Image credit:

Think of encryption as being a lock.  It's your lock on your data or data stream.

So, in this story I'd like to demonstrate how one can, using most any Linux Distribution, secure an anonymous Internet session using Secure Shell (ssh).

Most every Linux Desktop Distribution includes in its tools bundle ssh.  I won't get into why, but suffice it to say that ssh is the standard de rigueur for all manner of system administration.  There are many books written about it.

If you happen to be using Microsoft Windows, you may want to consider installing Cygwin (recommended) or Putty to have secure shell available.

Okay this example will assume you are using Linux.  So here goes.

First step will be for you to establish a shell proxy account.  There are many from which to choose.  Mine is to which I have my own personal login account.

So, with a shell account now in place, we need to establish a connection to it using secure shell.  The connection obtained using ssh establishes an encrypted channel, or, tunnel.

In this example, I am using my own credentials by opening a terminal window and typing:

[dietrich@localhost ~]$ ssh -D 8080's password: 
Last login: Tue May 28 11:36:50 2013 from
OpenBSD 5.1 (GENERIC.MP) #188: Sun Feb 12 09:55:11 MST 2012

         _ __   welcome to        _          __     ____           __ 
   _____(_) /__  ____  ________  (_)________/ /__  / __/__  ____ _/ /_
  / ___/ / / _ \/ __ \/ ___/ _ \/ / ___/ __  / _ \/ /_/ _ \/ __ `/ __/
 (__  ) / /  __/ / / / /__/  __/ (__  ) /_/ /  __/ __/  __/ /_/ / /_  
/____/_/_/\___/_/ /_/\___/\___/_/____/\__,_/\___/_/  \___/\__,_/\__/  
        for support visit

            Come idle with us on's #sd!

      Upgraded to 5.1
      PHP works again in user web space, and your
      scripts now run as your user with suPHP.  Sorry
      that took like a year.


Ok perfect.  Per, the above, we now are connected, or tunneled to the shell account.
Leaving the terminal window open is important, or, your connection will terminate.

Now we need to use a browser which supports proxy configuration.  In this example I show how to set up a proxy with Firefox.  You may have heard of it. ;)

First, load Firefox, then on the menu, go to Edit->Preferences and this window should display:

Firefox Preferences, Select Advanced (top), then the Network Tab
As shown, I have first clicked the Advanced Icon at top, then clicked the Network Tab.  You should see this next window display:

On the Advanced Network Tab, click the Settings button
Selecting the Network Tab and pressing the Settings button should then display this window:

Set to Manual proxy, using port 8080, localhost and SOCKS5
Per the above, I've set the browser to manual proxy using port 8080, localhost and SOCKS5 proxy.  Using SOCKS5 proxy is very important.  It sends all DNS queries through the tunnel, otherwise they would be generated separately and go onto the Internet directly from your localhost machine by-passing the tunnel and would be sniffable by any third-party monitoring your activities.

Once set, click OK, close Firefox and reopen it.  As I know my WAN ip is 24.58.x.x, I am now checking my ip address returned by website, which when plugged into website confirms the outbound WAN ip in a Chicago, Illinois location.

Website returns the ip of my proxy.

Website shows the ip of my browser is in Chicago, Illinois

So, my tunnel from Upstate New York is connecting and going out the other endpoint of the tunnel in far away Chicago.

There you have it.  A simple free way to surf anonymously.

-- Dietrich
Enhanced by Zemanta


Post a Comment