Port forwarding

A tunnel forwards a port through one of your saved hosts. MorphGate keeps tunnels in the vault, so they sync with it, and you start and stop them from the sidebar.

Three kinds of tunnel

Local
A port on this computer reaches a destination the server can see, like ssh -L. Typical use: a database that only listens behind the server.
Remote
A port on the server reaches a destination this computer can see, like ssh -R. Typical use: showing a local development server to the server.
SOCKS proxy
A SOCKS5 proxy on this computer. Every connection through it leaves from the server, like ssh -D. Point a browser at it.

Create a tunnel

  1. Choose New tunnel next to Tunnels in the sidebar. You need at least one saved host.
  2. Give it a Name, or leave it empty for one made from the host and destination.
  3. Pick the host under Through host.
  4. Pick Local, Remote or SOCKS proxy.
  5. Under Listen on, enter the address and port to listen on: on this computer for local and SOCKS tunnels, on the server for remote ones. For a remote tunnel, port 0 lets the server pick one.
  6. For local and remote tunnels, enter the Destination and its port. For a local tunnel, the destination is as seen from the server; for a remote one, as seen from this computer.
  7. Choose Save, or Save & start.

Listening on 127.0.0.1 (the default) keeps a local tunnel to this computer. If you enter another address, MorphGate warns that other machines on your network can use the tunnel.

Start and stop

Each tunnel in the sidebar has a switch. Turn it on to start the tunnel, off to stop it. While a tunnel runs, the sidebar shows how many connections are open through it. Saving changes to a running tunnel stops it.

A tunnel uses its host's whole route: the host's saved sign-in, its jump hosts and its VPN.

Good to know

  • A tunnel and its host must be in the same vault. In a team's shared vault, everyone with access can use the tunnel.
  • Locking the vault stops every tunnel.
  • Tunnels don't start by themselves when MorphGate opens. Start the ones you need.