SSH proxy - An alternative to VPN

SSH proxy is often called as poor man's VPN. If you have a VPS or server , then you can use the same to divert all the net traffic via that server. In other words we can use our VPS / Server as VPN.

To use your server as VPN/ Proxy , just issue this command in terminal.

ssh -D <socksport> -C <username>@<server ip address>

Socks port can be any number. Just remember this number and configure the proxy settings in your applications accordingly.
Create SSH Proxy
Create SSH Proxy

ssh - D 9999 -C [email protected]

The proxy will be created in local host and the socks port mentioned. Just change the proxy settings accordingly in your applications.

For example if you use Firefox , then just change the proxy settings in
Preference >> Advanced >> Network >> Settings.

Just mention which is the localhost IP and the socks port you created.
Configure SSH proxy in firefox
Configure SSH proxy in firefox

Thats it :) Voila all your web traffic will be routed via the VPS/Server.
Original IP address
Original IP address
Changed IP address
Changed IP address

The advantage of SSH proxy over VPN is that only certain applications can be used to divert the traffic and other applications can run on normal internet connection.

P.S : If you use windows and putty, just go to Connection >> SSH >> Tunnels 
SSH proxy using PuTTY
SSH proxy using PuTTY

Select Dynamic and write any socks port you want to create in source port and click add. Now logon to the server and make changes as mentioned above in Firefox or any application. The traffic will be routed via the server.

About This Blog

There is something for everyone. !! A tech blog on various topics. Let it be devops, programming etc; we have it all covered here in layman terms :)

Total Pageviews

Back to TOP