Monday, February 7, 2011

How to make a secure tunnel connection to a Cent OS from a MAC client through ssh

Let's say that you are on a coffe in down-town where you have wi-fi and your laptop with you, and you want to browse secure. You should know that a wireless connection is always unsecure, because anybody can sniff your packets and find out what you're doing on your laptop.

The Cent OS that we are going to use, has a ssh server up and running and connected to internet. So the tunneling that we are going to make can route any applications that supports SOCKS5 proxy.

So let's connect to our ssh server by using terminal:



Now we can setup any applications that supports SOCKS5 proxy to use this secure ssh tunneling.

Example:

Setting up Firefox browser to use our SOCKS5 proxy connection.

We open up firefox and go to preferences: Firefox->preferences, which is different by your version of Firefox. We go to Advanced tab and then Network and we click Settings.



We click manual proxy configuration like in this image, then onsocks input we enter localhost and on the port input we enter 10000 that we used to setup our SOCKS5 proxy tunneling. Then we click OK.


We can check now that we are using ssh tunneling by running a website that shows our ip adress, likehttp://www.ip-adress.com and we should see the Cent OS ip adress.

No comments: