SOCKS Proxy using SSH Tunneling

SOCKS or Socket Secure is an protocol used to move network packets between the computer and the proxy server. You can use any standard Linux server to set up your SOCKS proxy as long as you have SSH (Secure Shell) access. You do not need to install any additional software on your server for this to work.

As a digital marketer doing SEO, you may need to run SERP rank checks and if you do it often enough, search engines may temporarily block your computer’s public IP address. Or if you are at work or school where IT blocks websites that you need to access, this can be a viable method to get around that—as long as you are not doing anything illegal.

Here are some advantages of SOCKS proxies over other types of proxies:

  • Lives on the Session Layer (refer to the OSI model) so anything above that on the Presentation Layer and Application Layer (eg. HTTP, FTP, etc.) will all pass through the SOCKS proxy
  • Use a proxy on SEO software that does not have native support for  proxies
  • Does not require anything special as long as you have a Linux server with SSH access
  • Avoid the risk of middlemen stealing your data in contrast to public proxies

Note: Even though DNS is on the Application Layer, Windows will use your default DNS, in which case would probably be from your ISP. You can use a software such as DNS2SOCKS if you want to route DNS traffic through the SOCKS proxy too.

This tutorial is for Windows and you would need to download PuTTY (SSH client) if you do not have it.

Download PuTTY

Part 1 – Establishing the SSH Tunnel

  1. Open PuTTY.
  2. On the left, click on Connection and check “Enable TCP keepsalives (SO_KEEPALIVE option)”. This will prevent the connection to your server from disconnecting if there is no activity.
  3. Go to Connection -> Tunnels and for “Source port”, type in 8080 (you can use any port number but make sure that is the same port you use in Part 2). Next, change the radio button from Local to Dynamic, click Add, and it should say D8080.

  4. On the left, click back to Session, enter your server’s domain name or IP address, and click
  5. Enter your SSH username and then the password to establish the SSH connection with the server.

Part 2 – Setting up the SOCKS Proxy Connection

  1. If you are using Windows 10, search for “Configure proxy server” in your task bar and open that up. If you are using a different version of Windows, you may need to go to the Control Panel, go into Internet Options and click on the Connections tab.
  2. Under “Local Area Network (LAN) settings” towards the bottom, click the “LAN settings” button.
  3. Check “Use a proxy server for your LAN (These settings will not apply to dial-up or VPN connections).” and click on the “Advanced” button.
  4. Under the Type column, you will see one that says “Socks”. Enter “localhost” for the Proxy address to use and 8080 for the Port. Leave the rest empty, and click OK to apply changes and exit out of the Proxy Settings window.
  5. Click OK again to apply changes and exit out of the Local Area Network (LAN) Settings window.
  6. Click OK one more time to apply changes and exit out of the Connections window.

At this point, any traffic from your computer will go through the SOCKS proxy using your SSH tunnel. To be sure, I recommend using a website like whatismyip.com to double check.