You are here

The option of bypassing locks of Internet resources at work. Configure the SSH tunnel.


In this article I will show you how to organize an ssh tunnel from a computer running Windows. The server can be a computer with Linux on board, or your router. If the router from the box does not support SSH, then you can put custom firmware and most likely it will support SSH.

It's not always possible to create a full-fledged VPN tunnel, and this is not always necessary. For example, if you want to connect to your home from work, and if you have strict rules on using the Internet at work, then most likely you will have ports that can be plugged in which you can connect, so to speak, in full ways. But in most cases it is bypassed using SSH.

You can hang it on port 443 on a home device (that would be listening to this port from the Internet). This port is used for HTTPS, it is usually not closed, and not even filtered.

The requirement to install the SSH tunnel is one - you must connect via SSH to your device. We will use Putty to connect.

Download the ]]>utility]]>, run it, enter data about the connection, specify the port, enter the name of our connection in the field saved sessions, and click the save button.

lick the Open button, accept the certificate, and enter the username and password. After you have connected, go to the settings (right click on the icon Putty - change settings).

Go to Connection - SSH - Tunnels. Here you can choose how we want to do the tunnel. If from a local computer to a remote network, then you need to select Destination - Local, if you want to connect from a remote computer to a local network, you need to select remote.

In the port field we enter the port that we will use to connect, we need to select any free port, for example, 3002.

In the destination field, enter the local address of the computer to which we will connect, for example, my virtual machine with Windows address is 192.168.1.106. This address must be accessible from the computer to which we are connected. Well, or if you chose Remote, it should be accessible from your computer running Putty.

After the address through the colon, add the port on which the service hangs to which it is planned to connect. For example, for RDP, the default port is 3389, for HTTP - 80, for VNC - 5900, etc.

As a result, I will connect to the home network, via RDP to the Windows computer with the address 192.168.1.106 - I select Local, source port - 3002, destination - 192.168.1.106:3389. Click Add.

After that go to the Session tab, select our session, and click the save button, and then click Apply.

Thats All, now after your session will be installed to the home network, you can connect to the home computer. To do this, enter the connection address 127.0.0.1:3002.

If you configured a tunnel for a remote network (Remote selected), then on the remote computer you enter the same address and you connect to the working computer.

In this way, you can not only connect to a computer, but also use a home computer as a Socks Proxy. For example, if you want to access sites that you do not allow (for example, social networks), but they are either blocked, or you are afraid that requests can be monitored by someone, then you can go to them as if you were visiting from your home computer.

To do this, in the tunnels you need to add a rule - souce port - any free, for example 8080, the address is left empty, and the destination is selected Dynamic.

After that, you need to configure the proxy in the browser, in Firefox for this go to the settings - additional - network - configure the Firefox connection settings with the Internet.

Here we select manual configuration of the proxy service, and in the SOCKS node field specify the address - 127.0.0.1 and port 8080, also select the SOCKS version - 5.

After that, all the pages that you will open in the browser will be downloaded from your home network.

                                               

0 0

Share the article with your friends in social networks, maybe it will be useful to them.


If the article helped you, you can >>thank the author<<