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:
First, I need to set up the tunnel:
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.
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:
I am tunneled!
Enjoy HaCkInG.....