Contact Sales Sitemap Customer Login

Instant SOCKS Proxy over SSH

Contents

Introduction

There are many situations which call for a higher level of security and privacy than the immediate network provides: having a SOCKS proxy at your disposal is often the quickest and most convenient solution.

If you have ever checked POP3 e-mail, accessed an account on an FTP server, or encountered a website which was blocked by the local network administrator, this guide will explain how to protect your passwords over the local network and maintain access to the sites you frequent, regardless of local restrictions.

This guide will explain how to configure your VPS to act as a proxy server and configure your Linux or Windows client software to use the SOCKS proxy.

Note: The VPSLink Acceptable Use Policy expressly prohibits the operation of a public proxy. Please limit user accounts to trusted users to ensure the security of your VPS.


VPS Configuration

No special configuration is required - your VPS will be running an SSH daemon by default.

Note: We strongly recommend that you review our Linux security best practices to change the port which SSH is listening on as a security precaution.


Client Configuration

Considerations:

Linux

  1. Open a local console
  2. Enter the following command: ssh -p VPS_SSH_PORT -D LOCAL_PROXY_PORT USERNAME@VPS_IP_ADDRESS with the following replacements:
    • VPS_SSH_PORT - The port on your VPS which is listening for SSH connections
    • LOCAL_PROXY_PORT - The port on your local machine which will accept SOCKS connections
    • USERNAME - The username for an account with SSH login capabilities on your VPS
    • VPS_IP_ADDRESS - The IP address of your VPS
  3. Log in with your user account password
  4. Open your client applications and enable proxy use on your local SOCKS proxy port

Windows

  1. Open the PuTTY SSH client
  2. Complete the following fields under the Session category:
    • Host Name (or IP Address) - Enter the IP address for your VPS
    • Port - Enter the port which the SSH daemon is listening on
  3. Navigate to the Connection > SSH > Tunnels category
  4. Complete the following fields under the Tunnels category:
    • Source port - Enter the port on your local machine which will accept SOCKS connections
    • Destination - Enter the IP address for your VPS
    • Select the Dynamic radio button
  5. Click the Add button to add the source port association
  6. If you would like to save your SOCKS proxy settings:
    1. Navigate back to the Session category
    2. Enter a label for your settings in the Saved Sessions field
    3. Click the Save button
  7. Click the Open button to initiate a connection with your VPS
  8. Log in with your username and password
  9. Open your client applications and enable proxy use on your local SOCKS proxy port


Application Configuration

Keep in mind that you will need to have an open an SSH connection to your VPS in order to use application SOCKS proxy settings. If your local machine is no longer listening for connections or your connection to your VPS is interrupted, SOCKS-enabled applications will report that no connection exists.

FireFox

The FireFox browser can easily be configured to make use of a SOCKS proxy - additionally, the FoxyProxy FireFox extension allows for domain-specific proxying rules.

Use the following steps to modify your FireFox settings to route all browsing over your proxy:

  1. Open FireFox and select the Tools option from the menu bar
  2. Switch to the Advanced section and select the Network tab, then click the Settings button
  3. Select the Manual proxy configuration option
  4. Enter localhost in the SOCKS Host field and your LOCAL_PROXY_PORT in the corresponding Port field
  5. Browse to WhatIsMyIP.com to confirm that the IP address for your VPS appears


Use the following steps to install and use FoxyProxy with your SOCKS proxy:

  1. Go to https://addons.mozilla.org/en-US/firefox/addon/2464 and click the Add to FireFox button
  2. A dialog will open - when prompted, click the Install button to install the FoxyProxy extension
  3. Once the download and installation process has completed, you will be prompted to restart FireFox to enable the extension
  4. FoxyProxy will prompt you to configure Tor once FireFox has restarted - select No
  5. A shortcut to your FoxyProxy configuration will now appear in the lower right-hand corner of your FireFox window - right-click the status bar option and select Options from the menu
  6. Under the Proxies tab click the Add New Proxy button
  7. Enter a label for the proxy configuration in the Proxy Name field
  8. Select the Proxy Details tab
  9. Enter localhost in the Host Name field and your LOCAL_PROXY_PORT in the Port field
  10. Check the SOCKS Proxy option and click OK
  11. You may now right-click the FoxyProxy entry in the status bar to toggle use of your proxy connection or add URL patterns to match when selectively using your proxy or default connection

Visit the FoxyProxy FAQ's for advanced configuration instructions.

Retrieved from "http://wiki.vpslink.com/index.php?title=Instant_SOCKS_Proxy_over_SSH&oldid=15216"
Recent Changes | RSS RSS Feed