Application scenarios

For security, the server must be accessed through a jumper, and the ports exposed to the external network are strictly limited. In this case, accessing services or systems on the server locally can be a pain. A simple solution is to establish an SSH tunnel between the local and the jumper. The SSH tunnel provides a network proxy service. Through the proxy service, you can directly access any port on the server on the LAN where the jumper resides.

The method described in this document is more convenient than common port mapping and does not need to configure an SSH tunnel for each port, including the operation method on Windows, Mac, and Linux.

Establishing an SSH Tunnel

The Windows version

The common XShell used on Windows is used here.

1. Configure a regular SSH connection

Configure user names, passwords, and host addresses (usually jumpers).

2. Add a tunnel

3. The other

Mac and Linux version

It is very simple to set up an SSH tunnel with a single command.

  ssh user@host -ND 1080
Copy the code

Using SSH Tunnels

Used with SwitchyOmega

Used by the browser to access the server page

This parameter is used with Proxifier

You can allow any program to access services and ports on the server, for example

  • Access the database on the service using Navicat (no public network exposure)
  • Give locally running code access to the API on the server

Configuration method

1 Configure the proxy server

2 Configuration Rules

3 Instructions

After the rules are configured, the local application can directly access the Intranet IP address of the server.

For example, connecting to a database: