Hot Deals from Flipkart

Monday, July 26, 2010

SSH Tunneling: Hack/ Bypass Firewall restrictions Part 2.

I've been working with ssh tunneling, and thought I'd pass along a practical example of implementing it.This use, web browsing through an encrypted tunnel through another host, is useful for many scenarios.

For example, a WIFI hotspot, where you don't want your browsing sniffed or if you live in a country where your activities are monitored, but you have foreign shell access.

This tutorial uses linux and firefox, I assume it would be pretty easy to do in windows with putty or something. I have added all basics of ssh tunneling in my previous post SSH Tunneling: Hack/ Bypass Firewall restrictions.

To get started, first, here's me without the tunnel:



ssh tunneling method

First, I need to set up the tunnel:

ssh tunneling using terminal

After authentication it will hang. This is what you want.
The -N option is for a non-interactive connection
The -D binds a local port. A high port number so you don't need root privilege.

Once the tunnel is established, we need to bind the browser to send requests through that port.

configuring firefox for ssh tunneling

As shown, manually set the proxy port for the same as you bound to the ssh session.
In firefox, Edit/preferences/advanced/Network/connection settings.


Done. Now another visit to an IP checker:

IP Address changed due to ssh tunneling

I am tunneled!

Enjoy HaCkInG.....