2.4 Tunnels, jump hosts and outbound proxy
Translated from French; the French version prevails if the two differ.
In short. HexaConnect manages named SSH tunnels (local, remote, SOCKS) that run without a window, VPNs (WireGuard, OpenVPN-compatible, Fortinet and Cisco AnyConnect gateways), a setup tunnel per session, SSH jump chains used by every kind of session and by the API client, access without an open SSH port through cloud providers' tools, and two kinds of outbound proxy: one for an SSH session and one for the API client.
Tunnels
Types
| Type | OpenSSH equivalent | Use |
|---|---|---|
| Local | -L | A port on this computer reaches a service behind the SSH server (database, admin console). |
| Remote | -R | A port on the server reaches a service on this computer. |
| Dynamic (SOCKS) | -D | A local SOCKS proxy that exits through the SSH server. |
Manager
- “Tunnels” in the sidebar: list of named tunnels with their status (active, starting, reconnecting, failed, stopped) and the number of connections received; start or stop with one click, edit, duplicate, copy address, delete.
- Each tunnel is carried by a saved SSH session (with its jump hosts); a single carrier connection per session, shared by its tunnels, opened without prompting if the session is already open. The carrier's host key is verified just as for a terminal.
- Start: on demand, when HexaConnect launches, or with the carrier session.
- Automatic reconnection with an increasing delay (2 to 60 seconds). Warning and Critical alerts are Windows notifications.
- Listens on
127.0.0.1by default; listening open to the network (0.0.0.0) is confirmed at each start. - Tunnels run without a window: with the window closed, they keep running as long as HexaConnect is running (icon in the notification area).
- A change to a running tunnel applies at its next start. The volume transferred per tunnel is not shown.
Session tunnel
The Tunnels button in the toolbar chooses the tunnel for the active session. The name of the effective tunnel is shown in the button. It offers:
- “None”;
- the “Setup tunnel” inherited from the folder;
- a named SSH tunnel, with its status;
- a VPN (“VPN” section, with the status of each profile);
- “Reconnect session now” and “Manage tunnels…”.
The “Setup tunnel” field exists in SSH and SFTP sessions and in folders. It is inherited like the jump host; “None” breaks the inheritance. You can also choose it by right-clicking the session, › Tunnel › Go through… (see 2.2).
On connection, the tunnel is started if it is not running, then it replaces the session's jump host and proxy:
- a SOCKS tunnel (-D) serves as the proxy;
- a local forwarding (-L) to the session's host and port serves as the entry point;
- a VPN is connected if it is not already (a connection in progress is waited for), then the session connects directly, routed through the VPN adapter. If the VPN does not connect, the session does not open and the message says why. A host not covered by any VPN route is reported in the log.
The host key is still verified under the session's name. The following are refused with a clear message: a remote tunnel (-R), a tunnel carried by the session itself, a forwarding to another host, a deleted tunnel, tunnels that carry each other. Two sessions that start the same tunnel share a single start.
VPN
The VPN section of the Tunnels panel, below the SSH tunnels, manages profiles of four kinds:
| Kind | Import | Engine |
|---|---|---|
| WireGuard | .conf file | wireguard-nt, bundled |
| OpenVPN-compatible | .ovpn file (referenced files are inlined on import) | openvpn.exe 2.6, shipped separately, unmodified |
| Fortinet gateway | FortiClient .xml export, text, or “Add a gateway” | openconnect.exe 9.21, shipped separately, unmodified |
| Cisco AnyConnect | .xml profile (one profile per server), or “Add a gateway” | same |
- Secrets: settings in
vpn.json, with no secrets; private keys, preshared keys and passwords in the Windows vault. “Edit” shows the text with secrets masked. - Check on import: scripts (
PreUp,up,plugin…) are never run; an unknown or dangerous directive is refused with its line number; ignored settings are reported. - Connect: the first connection after HexaConnect launches starts the
HexaConnect.Vpn.exehelper through the Windows prompt (UAC), after a confirmation, and another one before any VPN that takes all traffic. The helper then holds all the adapters. User name, password, one-time code or passphrase are asked for when needed; “Remember password” stores it in the vault. - Status: address in the tunnel, counters (received, sent, last handshake for WireGuard), reconnection; alert if the helper or the process stops.
- Closing: closing HexaConnect removes the adapters.
- Settings › Tunnels › VPN: shipped helper, wireguard-nt driver status, whether OpenVPN and openconnect are shipped, “Remove the VPN driver”.
SSH jump hosts
- A session, or a whole folder, goes through another saved SSH session, which may itself go through a jump host: up to 4 chained jump hosts (equivalent to
ProxyJump). - Authentication to the target starts from this computer, never from the jump host, and the target's host key is still verified under its own name.
- Jump host loop or deleted jump host: clear message before any connection.
- A bastion stored in the folder it serves connects directly itself.
- Jump hosts are used by the terminal, SFTP, tunnels, and also by RDP, VNC, Telnet, raw connection, FTP, S3, remote PowerShell, connectors (“Go through SSH session”) and API client requests (“Route through”).
- The tree shows “via <jump host>” on the sessions concerned.
Cloud access without an open SSH port
“Cloud access” jump host type for SSH, SFTP only, RDP, VNC and Telnet sessions:
| Provider | Official tool launched by HexaConnect |
|---|---|
| AWS Systems Manager (Session Manager) | aws and its Session Manager plugin |
| Azure Bastion (native client, Standard tier) | az |
| Google Cloud IAP | gcloud |
- HexaConnect launches the installed tool in a monitored process, waits for the local port to respond (2 minutes at most, enough time for an SSO sign-in in the browser), connects the session to it, then stops the tool and its child processes on close.
- No cloud credentials are read or saved: the tool's profiles and SSO sign-in are used as they are. If the tool is missing, the connection says what to install; HexaConnect installs nothing.
- The SSH host key is still verified under the session's name. An SSH jump host and cloud access cannot be combined.
- On failure (expired token, IAM permissions…), the tool's exit code and last lines are reported.
- Cloud-side prerequisites: for GCP IAP, a firewall rule must allow the IAP range to the target port; for Azure Bastion, the instance is the full resource ID of the VM.
Required plan: Pro. Cloud access (AWS SSM, Azure Bastion, GCP IAP) is reserved for the Pro and Enterprise plans; in Discovery, it is refused before the tool is launched. SSH tunnels and jump hosts are included in the free plan.
Outbound proxy for an SSH session
- Per session or per folder:
socks5://,socks4://orhttp://(HTTP CONNECT), to reach the first host of the chain. - A cleartext HTTP proxy is flagged by the Security tab.
- Saved outbound proxies: SOCKS5, SOCKS4 or HTTP, created and edited in the column of the Proxy view (see 2.11); the password goes to the Windows vault.
- Proxy (right-click the session, see 2.2): none, SOCKS from a dynamic tunnel, or a proxy you enter, then reconnection. “None” also cancels a proxy inherited from the folder (value
directin the Proxy field). Proxy is not offered when a tunnel replaces the proxy.
Outbound proxy for the API client
Settings → API → “Outbound proxy (corporate)”, for API client requests only:
- Mode: none (direct connection), Windows proxy (system settings, PAC script) or specified proxy (address).
- Exceptions separated by “;” (for example
*.interne.fr; 10.*); local addresses bypass the proxy (localhost, 127.0.0.1, names without a domain). - Authentication: none, Windows account (NTLM, Kerberos, nothing to enter), or username and password (password stored in Windows Credential Manager).
- Requests that go through an SSH session do not use this proxy.
An API request can also start from a saved SSH session and its jump hosts (“Route through” setting, see 2.8). Using a dynamic tunnel as a request's proxy is not available in this version.