Friday, April 4, 2014

Putty SSH tunnel and bypass local firewall

Using Firefox with a Putty SSH tunnel as a SOCKS proxy


Hello,
My organization blocked everything and i would like to access my Facebook account so i used following trick and it work. I advice don't use too much you are not paying for facebook access :), Its good for security reason if you wish to redirect traffic to other network where security is not concern, its upto you how you use this ..good luck

The reason I wanted to do this one was viewing a site from an VPN IP address(Ip where all site accessible ;) )  rather than Local IP where firewall blocked facebook ;). 
 I tested this on my vpn account where i can access remote server and good things is that i can access facebook ;) and it worked perfectly. Here are the instructions:
1. You must have Putty software.
2. From Putty, go down to Connection > SSH > Tunnels. From this area, add in a source port (I’ve chosen 9870 but this can be any unused port),Desitnation : specified IP where you can route all request from your local pc to remote and choose ‘Dynamic’. Then click ‘Add’ and you’ll get an entry under “Forwarded Ports”:
putty1
3. Go back to Session and connect to SSH(destination IP). You can save your session to load later rather than retyping the details:
putty2
4. Click “Open” and log onto your SSH session. You only need to log on with your credentials and get to a bash prompt.
5. Open Firefox, and go to the website http://whatismyip.com - take note of your external IP address, because this should change once you’re tunneling through SSH.
6. In Firefox, press the ‘alt’ key to bring up the top menu and go into Tools > Options. Under the “Advanced” area, go to the “Network” tab and in the “Connection” area click the “Settings” button.
firefox17. Choose the “Manual proxy configuration” radio button, and under SOCKS Host enter “127.0.0.1″ and the port you entered into Putty (in my case it’s 9870). Make sure SOCKS v5 is selected.
firefox2
8. Press OK twice to get back to the main view of the Firefox Browser. Try again to get to http://whatismyip.com - if all is working, you’ll see a different IP address which is from the server you’re SSH’d to. If something isn’t configured correctly, you’ll more likely see a browser error like “The proxy server is refusing connections”. 

No comments:

Post a Comment