Skip to content
Supporting clients since 2024 · 15 years of IT experience
Docs menuTunnels and port forwarding

Tunnels and port forwarding

Forward a port through one of your SSH hosts — to reach a database, share a local dev server, or browse through a SOCKS proxy. Tunnels reconnect on their own.

Updated · Describes CybexConnect 1.3.2

A tunnel runs through one of your SSH hosts, including through its jump host if it has one. Create one in Tunnels, from a host's ⋯ menu (New tunnel through this host…), or in the host's edit screen.

The three kinds#

Local: reach something the server can reach#

THIS PCYour apppsql, browserListens127.0.0.1:5433SSHSSH serverweb-01Destinationdb.internal:5432
Local (-L). This PC listens. Whatever connects to it comes out at the destination, as seen from the server.

Opens a port on this PC that leads to a destination the server can reach, such as a database on its private network. Same as ssh -L.

Example
Listen on this PC   127.0.0.1 : 5433
Destination         db.internal : 5432   (as seen from the server)

psql -h 127.0.0.1 -p 5433 -U app

Remote: let the server reach this PC#

THIS PCDestinationlocalhost:3000SSHTunnelServer listensweb-01 :8080Visitorcurl web-01:8080
Remote (-R). The server listens. Connections to it come back through SSH to a destination as seen from this PC — a dev server, say.

Opens a port on the server that leads back to this PC, like sharing a local dev server. Same as ssh -R.

SOCKS proxy: let each app pick#

THIS PCBrowserCLI toolSOCKS127.0.0.1:1080SSHSSH serverbastionintranet:44310.0.4.7:22
SOCKS proxy (-D). One port on this PC; each app names its own destination and the server makes the connection.

A SOCKS proxy on this PC (port 1080 unless you choose another). Point a browser or tool at it and each connection goes out from the server to wherever it asks. Same as ssh -D.

Listening address#

Tunnels listen on 127.0.0.1 by default, so only this PC can use them. If you change it to 0.0.0.0 or a network address, any device on your network can use the tunnel.

Running tunnels#

  • Start and stop each one from its row. A running tunnel shows how long it has been up, data in and out, and connection count.
  • Tick Starts when the vault is unlocked to have a tunnel come up on its own (marked Auto).
  • If the SSH connection drops, the tunnel reconnects by itself and shows the attempt number while it does. A tunnel that stops for good shows on the Dashboard under Needs attention.

Still stuck?

Tell us what you tried and what you saw. The people who build CybexConnect answer support requests.