Easily create SSH tunneling using XShell free SSH client

In my previous post, I’ve introduced you to XShell, the better free alternatives to putty as SSH client in Windows. Now, we will create a SSH tunneling using Xshell just like in putty. If you are new to SSH tunneling, simply put, you by using SSH tunnel, you have your own anonymous secure SOCKS5 proxy on your own. (Of course, first: you had to have a SSH server on the internet). What’s anonymous SOCKS5 prosy for? A lot, such as: anonymous browsing, spoofing your originated country, or just an alternative to private VPN.
OK, so let’s start:

  • Create a new SSH server session in XShell (File –> New or Ctrl+N) and fill all necessary server info such as session name host IP address (or hostname) and port number (if you are using non-conventional port)

xshell server properties

  • Choose “Tunneling” in the left Category

xshell tunnelling category

  • Click on the “Add” button

xshell add tunnel button

  • A new window/form will be shown. Choose “Dynamic (SOCKS4/5)” in “Type (Direction)“. Fill your desired local port number for the tunnel (default is 1080). Then activateAccept local connections only” check box. Click “OK” then “OK” again to close the server configuration window.

xshell socks5 properties

  • After the session settings is saved, connect it! Now your own local SOCKS5 proxy  is ready. You can use it for your browser (example : Firefox Options/Preferences –>Advanced–>Network–>Settings). Fill “localhost” or “” as your “SOCKS Host” then fill “Port” with the same number as your XShell settings in previous steps. Now you are ready to browse anonymously using your own SOCKS5 proxy.

firefox socks5 settings

  • Back to Xshell, you can view the traffic going through the SOCKS5 proxy via accessing XShell menu: View –> Tunneling Pane

xshell view tunneling pane

  • This is how the traffic looks like:

xshell tunneling pane

  • Not sure you are already in anonymous SOCKS5 proxy? Access my other site project here: http://reverse.vrank.org/ipinfo.php . The site will tell you what’s your detected IP address and where country are you from (based on IP address).

xshell anonymous socks5 proxy success

As you can see, my IP address now is the same as my SSH server’s IP and my country is also the same as where the SSH server reside. It is detected as United States although I’m actually browsing from Indonesia. Now, the three server variables also had blank/none value that tells the site you’re directly accessing the site not via proxy whatsoever. Happy tunneling!

  1. Is there a quicker way to do this on a windows server with multiple ips

    say i have 5 additional ip address to

    how to i manually assign/open random ports to these ips example

    ip1:port 11223, ip2,port112254 ip3:port12345

    i would like these additional ips to be able to take UDP/TCP traffic.

    Dont know how to do this and your assistance / guidance will be needed.


    • your remote server only need to open one port, i.e. 22 (standard SSH port — which of course you can change it to whatever you like on SSHD config)
      while your XShell client open multiple SSH connections/sessions to your remote server via different IP addresses (create multiple tunneling settings).
      Now your localhost/local PC will have 5 local socks5 proxy working on different port based on your preference.

  2. How do i get host ip or hostname and port?

  3. Thanks for the guide. I have a few questions, what kind of IP should be used for this?. Should it be HTTP/HTTPS, will private/dedicated/shared all have the same result when using SSH, that they will all become SOCKS5 using this method. Can you provide any links to companies that sell the required IP’s, thanks.

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>