How to Use Your VPS Server as a Secure VPN




Bypass Location Restrictions on Sites

This is a method/Tutorial which will provide you with an IP address for your own secure use. Comes in VERY handy if you have, say, a US-based VPS, you are outside the US, and you want to use a US IP address to check CPA offers, to open a US-based PP account for your US Corp or LLC, etc

Caveat: This will only provide you with ONE IP address (the server's IP), so it is not of much use for CL or other methods which require multiple "clean" IPs. However, if you perform only simple, US IP required, browsing or other tasks, it's perfect.

Requirements:

A Linux or Unix based VPS/Server, in whichever country you wish your IP to be.
SSH access to your VPS/Server.
Putty SSH Client
Firefox Browser, ideally.

How To Set it all Up:

Create SSH Tunnel

1. First open PuTTY and you should see the “PuTTY Configuration” window. In the “Host Name (or IP address)” field, type the hostname or IP address of your VPS/Server. Select “Connection type” as “SSH“. The port will be automatically selected to 22.

2. Now, on the menu on the left-hand side of Putty, select "SSH", and on the right, in the section named "Protocol Options", check the "Enable Compression" checkbox, and select 2 as the preferred SSH protocol version.

3. In the menu on the left, click the plus sign next to SSH to expand it, and select "Tunnels". On the right-hand side (Options controlling SSH port forwarding), you will see, about half-way down, a field named "Source Port". Enter a port number in there, I used 1080, but you can use anything.
Check "Dynamic" and "Auto" just under the Source Port field, and, once these have been selected, click "Add" next to the Source Port box.
You will see, above the Source Port box, a Forwarded Ports box which now contains D1080 (or DwhateverPortYouUsed).

4. Finally, in the left-hand menu, return to Session, which is the very first item at the top, and, on the right hand side, you will see the window you were on in Step 1, when you first opened Putty. About halfway down, in the first Saved Sessions field, type in a name for this connection (I call mine SSH Tunnel), and, a bit further down, to the right of the second field under Saved Sessions, click the "Save" button.

PUTTY is all set up now. When you are ready, you will hit "open" and log in to your server.
In the future, you can open Putty, select the connection you just saved from the Saved Sessions box, click Load, and then Open, and log in to your server, to use this connection whenever you wish.

The next part of this tutorial deals with setting up Firefox on your computer. Once this is done, whenever you open Putty, use the connection above, and log in to your server, you can use this configuration in your Firefox browser to surf from your server's IP address.

1. In Firefox, go to Tools, Options, Advanced, and select the "Network" tab.
Once in the "Network" tab, press "settings".

In "Settings", select Manual Proxy Configuration. Leave all host fields empty except the "Socks Host" field.

a)In this field, enter 127.0.0.1.
b)In the Port field next to it, enter 1080, or whichever port you used when setting up Putty.
c) Immediately under the "Socks Host", select the socks v5 box
d) Immediately under that, in the "No Proxy for" field, enter "localhost,127.0.0.1" without the quotes.
e) Click OK to save the settings.

2. You're ready to go now, but, if you wish to ensure all DNS data also routes over the proxy, type "about:config" into the Firefox address bar and confirm you are aware of the dangers. In the "Filter" box below the address bar, type "socks", then, double-click the "network.proxy.socks_remote_dns" to set it to "true" (if already showing "true", you can skip this step).

That's it, folks!

Whenever you wish to browse using your Remote Server's IP address, just open Putty, connect to this connection, log in to your server and then open Firefox, select your manual proxy configuration, and visit an IP checker to double-check all is well.

To return to "normal" browsing, via your own connection, just return to Tools, Options, Advanced, Network, Settings, in Firefox, and set it back to whatever proxy you used to use, or to "No Proxy", if you don't normally use one.

Hope this helps some of you, I had been paying for a VPN service myself until I learned how easy this was. In this scenario, I am only dependent on my own VPS's IP address, so, for as long as I keep that "Clean", it's perfect for all my US browsing needs, unlike free or shared proxies, which tend to be "tarnished" before you ever get hold of them.

Also, bear in mind this does NOT open a proxy on your server/VPS, it continues to be fully secure, and you are the only one, via your Putty secure SSH login, who can access it.

This article first appeared on www.blackhatworld.com.

{ 0 comments... read them below or add one }

Post a Comment