Browse Secure

in

Got a web server? Host a website? Then you've got a free secure connection to the Internet. A non-technical rundown, really quite simple.

Ingredients:
1. Server/webserver account with SSH abilities. (SSH is a method of communication that allows information to be exchanged over a secure channel. Encryption provides integrity and prevents snooping of data. (Unless someone has a really really powerful computer and a week to spare decrypting a single email).)
2. A computer with an Internet connection.
3. SSH software. Linux and Mac OSX users already have this. Windows users' best option is to download PuTTY, support and installation instructions on the website, if you don't like PuTTY more software here here.

Background:

Concerned about using my laptop on unencrypted wireless networks, I looked into ways of making the connection secure. Below is the best fitting solution for my situation. It has the added benefit that I am surfing the Internet as if I were in Brea, California (the location of my server), not where I currently am, which has a less free vision of the Internet.

Instructions:

1. Set up a user account on your server with SSH permissions. I'm on Dreamhost, so I go to the control panel, click Users > Manage click on a username (or create a new user) and tick the 'SSH' box on that user's admin screen.

1. b If using Windows, install PuTTY or other SSH software. If using Linux/OSX, it's already there.

2. Set up public and private keys. (SSH works by encrypting traffic using private and public keys. Public keys allow decryption of anything encrypted with a private key, the public key is freely available, the private key is kept private. When connecting, the server sends the client (you) a public key, server key and 64 bit random number (cookie), both sides compute a session id using these then the client computes a session key (1Kb) encrypted by server's keys and cookie, which is used to encrypt the connection. More details here.)

To do this make a key for your computer. On the command line, type 'ssh-keygen -d' and press enter 3 times (at the three prompts which pop up).

Type' scp ~/.ssh/id_dsa.pub username@yourdomain.com:.ssh/authorized_keys2' where 'username' is your username (the one you enabled with SSH access on stage 1) and yourdomain.com is your domain name (or the server's IP address). Note that yourdomain.com is the address you usually use for logging in (so on Dreamhost it's actually ftp.yourdomain.com as this is the place SSH users log in - if you get errors check with your host).

Type the password for your username.

Type 'ssh -ND 9999 username@yourdomain.com' (the same note as above, if you usually login to another address like ftp.yourdomain.com, use that).

The first time you login you should be prompted whether to trust this server. If you're confident it is the server (and not someone else faking the server, which is possible but unlikely) accept - in the future you will be warned if the server identifies itself differently (and in this case, it would be a definite possibility someone is trying to fake the server).

You now have a secure connection. (If it looks like the SSH program has hung, don't worry, is hasn't, it is supposed t loook like that).

3. If using Firefox go to Edit > Preferences > Advanced > Connection > Settings and type in localhost for the hostname and 9999 for the port number. For the SOCKS number, it may be 4 or may be 5, varies depending upon the host.

Now you can securely browse the web as if you were located wherever your server is located.

Note:

Some Webhosts may not allow this in the Terms of Service. SSH uses quite a bit more processor power than a regular encryption: If you watch YouTube 24/7 using this technique the Webhost may notice the processor drain and take action against you.

Tis is a secure connection between your computer and your Webhost. It is not a secure connection between your Webhost and the website you're browsing.

Privacy and Security are not the same thing. This is a reasonably secure method to access the Internet. It is not a way to ensure privacy on the Internet. Your Webhost is likely to keep access logs for administrative and legal reasons. Law enforcement authorities can demand these logs, determine where you were connecting from, and contact your ISP as they would normally. Any use of the Internet leaves an information trail that it is almost impossible to avoid.

Yeah

Bandwidth is an issue. Depends on the plan. If I was downloading 6TB (plan limit) of stuff I'd probably already hit the 150MHz VPS (plan limit) with all that SSH encrypting/decrypting at that bandwidth!

Damn, my computer only has a 4GB HDD! And it's new!

Great tip

Excellent how to - one thing that probably should be mentioned as well is that browsing this way all the time may cause users to hit their server's bandwidth limits (particularly if downloading movies, etc.).

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2>
  • Lines and paragraphs break automatically.

More information about formatting options