Really Simple SSH proxy (SOCKS5)

Source: Internet
Author: User
Tags configuration settings ssh port ssh server

Original:

https://thomashunter.name/blog/really-simple-ssh-proxy-socks5/

SOCKS5 is a simple, eloquent method for getting yourself a proxified connection to the Internet. All need to get a proxy connection working are to run an SSH server somewhere, run a single command locally, and config Ure your software (or OS) to use the This proxy. Why would want to run a proxy? Well, all traffic sent between your client machine (e.g. a wireless laptop at a coffee shop), and the remote machine (e.g. Your home server located on your trusted network) would be encrypted. Also, your external IP address would be as that of the SSH server, which can is useful for various other reasons.

For this tutorial I'll show screenshots for setting a OS level proxies in OS X. Linux should have some similar GUI too LS involved, or you can always configure it on the command line. I ' m not sure if Windows have similar tools. I ' m Assuming you is familiar with Networking basics and has a Linux server Setup with Internet connectivity.

The first thing you'll need to does is install a SSH daemon on your Linux server. Depending on your OS, it's usually as simple as running the following command (most distro's allow all normal users SSH a Ccess by default, save for the root user).

sudo apt-get install sshd

You'll also need to having port forwarding setup for the SSH port (all) So, external requests to this port is forwarded to your server. I can ' t show though since I don ' t know how your router works!

Next, you'll need to run the following command in your client machine. What is the command does it executes SSH as a background process, and sets up port to listen locally for connection requ ESTs (You can change that number). It also doesn ' t display errors if there is any (useful for running automatically when you login to your client). It'll prompt you for a username and password though ... What are should do are setup your client and server to authenticate without a password, this would make your life a lot easi ER and allow the command to be executed without your intervention.

ssh-d 1080-f-c-q-n-p [email protected]

Easy, huh? You can now configure software to connect to a SOCKS5 proxies at localhost:1080. If you browse for Toip.thomashunter.name both before and after running this, you should see that your external IP address would Change.

You are wondering how to do the last part ... I ' ll now show you a bunch of screenshots for enabling this on the OS level using Apple OS X's network manager.

OS x:enabling SOCKS5 Proxy

First, open up OS X ' s system Preferences. You can usually does this by hitting CMD + Space, and typing Preferences and pressing ENTER.

OS X System Preferences

Next, click the Network icon under Internet & Wireless. You'll see a bunch of tabs, click the one titled Proxies.

Network Proxy Settings in OS X

Now, enable the SOCKS5 Proxy option. This would bring the configuration settings to the right. You'll want to enter a localhost for the server name and a for the port number. You won ' t need-a username or password with this proxy so leave them blank (the authentication happened earlier with The command we executed).

Network Proxy Settings in OS X

You can enable the Exclude-hostnames option if you plan on doing anything regarding other machines on the local net Work (local to the client). This was so and if you want to access a machine by it's DNS name, the proxy doesn ' t steal that request. This is the useful if you want to does work in a corporate office, for example.

Really Simple SSH proxy (SOCKS5)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.