> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/common-settings/vpn-tunnel-gateway.md).

# VPN/tunnel/gateway

Configure the VPN, tunnel or gateway that Remote Desktop Manager opens before a session, with its open and close modes, credentials and type.

The ***VPN/tunnel/gateway*** section defines a VPN, tunnel or gateway that Remote Desktop Manager opens before the session and closes afterwards: when to connect, which type to use, its credentials and when to disconnect. For an overview, see [VPNs, tunnels, gateways, and proxies](https://docs.devolutions.net/rdm/concepts/basic-concepts/vpns-tunnels-gateways-and-proxies.md).

Available for session entries, folders, the vault and synchronizers. It is not shown for VPN entries, since they are the VPN themselves. In the entry properties, select ***Connection*** – ***VPN/tunnel/gateway***. For the vault, go to ***Administration*** – ***Vault settings***.

Configured on a folder, the settings apply to the entries of the folder that use the ***Inherited*** mode. See [Configure a VPN for multiple sessions](https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/configure-a-vpn-for-multiple-sessions.md).

The section is read-only for users who do not have the ***Edit VPN/Tunnel/Gateway configuration*** permission on the entry. With [batch edit](https://docs.devolutions.net/rdm/ribbon-menu-bar/edit/batch-edit.md), select ***Override VPN*** to replace these settings on every selected entry.

The section has two tabs: ***VPN/tunnel/gateway*** and ***Advanced***.

### General

<table><thead><tr><th width="220">SETTING</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>Connect</strong></em></td><td><p>Defines when the VPN, tunnel or gateway opens:</p><ul><li><em><strong>Not enabled</strong></em>: no VPN, tunnel or gateway is used. This is the default value.</li><li><em><strong>Always connect</strong></em>: opens it every time the entry opens.</li><li><em><strong>Connect manually</strong></em>: does not open it automatically; open it on request, for example with the <em><strong>Connect</strong></em> button.</li><li><em><strong>Connect if unable to ping/port scan</strong></em>: opens it only when the host does not answer a ping or a port scan.</li><li><em><strong>Inherited</strong></em>: uses the type, the disconnect mode and the VPN group of the parent folder. Not offered for the vault.</li><li><em><strong>Ask for confirmation to connect</strong></em>: asks the user before opening it.</li><li><em><strong>Connect if the network adapter is not found</strong></em>: opens it only when the network adapter is not found.</li><li><em><strong>Prompt if unable to ping/scan</strong></em>: asks the user when the host does not answer a ping or a port scan.</li><li><em><strong>Connect if HTTP status code isn’t successful</strong></em>: opens it only when a request to the host does not return a success status code.</li></ul><p>With the <em><strong>Devolutions Gateway</strong></em> type, <em><strong>Connect manually</strong></em>, <em><strong>Connect if the network adapter is not found</strong></em> and <em><strong>Prompt if unable to ping/scan</strong></em> are not offered, and <em><strong>Always connect</strong></em> is selected by default.</p><p>The <em><strong>Connect</strong></em> button next to the list opens the VPN, tunnel or gateway now, with the current settings. It works on Windows and Linux.</p></td></tr><tr><td><em><strong>Advanced settings</strong></em></td><td><p>The button at the end of the <em><strong>Connect</strong></em> list, shown with the modes that test the host or the adapter. It opens the <em><strong>VPN - Advanced settings</strong></em> window:</p><ul><li><em><strong>Custom host</strong></em>: host to test instead of the host of the entry. Not shown with <em><strong>Connect if the network adapter is not found</strong></em>.</li><li><em><strong>Custom port</strong></em>: port to test. Shown with the ping and port scan modes.</li><li><em><strong>Adapter</strong></em>: name of the network adapter to look for. Shown with <em><strong>Connect if the network adapter is not found</strong></em>.</li><li><em><strong>Timeout</strong></em> and <em><strong>Custom status</strong></em>: wait time and status codes considered successful. Shown with <em><strong>Connect if HTTP status code isn’t successful</strong></em>.</li></ul></td></tr><tr><td><em><strong>VPN provider</strong></em></td><td><p>Type of VPN, tunnel or gateway, grouped under <em><strong>Existing</strong></em>, <em><strong>Configure</strong></em> and <em><strong>Custom</strong></em>. The types are listed after this table. Disabled when <em><strong>Connect</strong></em> is set to <em><strong>Not enabled</strong></em> or <em><strong>Inherited</strong></em>.</p><p>The buttons of the field:</p><ul><li><em><strong>Browse - VPN type</strong></em>: opens a window that lists the types with their icons.</li><li><em><strong>Add</strong></em>: creates a VPN entry in the vault. Windows only.</li><li><em><strong>Extract VPN</strong></em>: creates a VPN entry from the settings of a <em><strong>Configure</strong></em> type, so other entries can link to it. Windows only, and shown only to users who can edit the entry and add entries in its folder.</li></ul></td></tr><tr><td><em><strong>Disconnect</strong></em></td><td><p>Defines when the VPN, tunnel or gateway closes:</p><ul><li><em><strong>On session close</strong></em>: closes it when the session closes. This is the default value.</li><li><em><strong>Manually later</strong></em>: leaves it open; close it from Remote Desktop Manager or the VPN client.</li><li><em><strong>Confirm disconnection</strong></em>: asks the user when the session closes.</li></ul><p>Disabled for the types that Remote Desktop Manager does not close itself, such as <em><strong>Devolutions Gateway</strong></em>, <em><strong>Azure Bastion</strong></em> and <em><strong>CyberArk PSM SSH Proxy</strong></em>. The <em><strong>Disconnect</strong></em> button next to the list closes the VPN, tunnel or gateway now. It works on Windows and Linux.</p></td></tr><tr><td><em><strong>VPN group</strong></em></td><td>Name of a VPN group. The entries of a VPN group share one VPN connection, which stays open until the last of their sessions closes. Select an existing name, type a new one, or select <em><strong>Add VPN group</strong></em>. Disabled when <em><strong>Disconnect</strong></em> is set to <em><strong>Manually later</strong></em>. See <a href="https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/vpn-groups.md">VPN groups</a>.</td></tr></tbody></table>

### Credentials (VPN/tunnel/gateway)

These credentials are used to open the VPN, tunnel or gateway, not the session. A warning icon is shown when the selected type does not support credentials.

<table><thead><tr><th width="220">SETTING</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>Credentials</strong></em></td><td><p>Source of the credentials:</p><ul><li><em><strong>Default</strong></em>: the credentials entered in the settings of the selected type. This is the default value.</li><li><em><strong>Linked</strong></em>: a credential entry of a vault. Select the vault in the <em><strong>Vault</strong></em> list, then select the entry in the <em><strong>Credential</strong></em> field. Selecting the user vault from an entry in a shared vault finds the credential entry of each user's user vault whose name matches the <em><strong>Search string</strong></em>, resolved when the VPN opens. For credential entries that hold several values, such as a password list, select the value with the link under the field.</li><li><em><strong>My personal credentials</strong></em>: the personal credentials of the user. The button at the end of the field edits them.</li><li><em><strong>None</strong></em>: no credentials.</li><li><em><strong>My privileged account</strong></em>: the privileged account of the user. The button at the end of the field edits it.</li></ul></td></tr></tbody></table>

### Installation path

Shown for the types that use a client application installed on the computer. Select ***Configure*** to set where the client is installed. Windows only.

### Settings

Shown when a type is selected and ***Connect*** is not set to ***Not enabled***. The title includes the name of the type, for example ***Settings (Cisco VPN)***. The fields depend on the type:

* For an ***Existing*** type, select the entry to use, such as the VPN entry, the SSH tunnel entry or the session.
* For a ***Configure*** or ***Custom*** type, the fields are the same as in the matching VPN entry. See the entry pages linked in the list of types.

### Azure resource

Shown for folders and the vault, and for RDP and SSH terminal entries that use the ***Azure Bastion*** type. See [Configure an Azure Bastion entry in Remote Desktop Manager](https://docs.devolutions.net/rdm/integrations/remote-access/azure-bastion.md).

<table><thead><tr><th width="220">SETTING</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>Subscription ID</strong></em></td><td>Azure subscription of the virtual machine: <em><strong>Default</strong></em>, <em><strong>Inherited</strong></em> (value of the parent folder) or <em><strong>Custom</strong></em> (enter the ID). A custom value cannot be empty.</td></tr><tr><td><em><strong>Resource group</strong></em></td><td>Azure resource group of the virtual machine: <em><strong>Default</strong></em>, <em><strong>Inherited</strong></em> or <em><strong>Custom</strong></em> (enter the name). A custom value cannot be empty.</td></tr><tr><td><em><strong>Scale set</strong></em></td><td>Virtual machine scale set: <em><strong>Default</strong></em> (a standalone virtual machine), <em><strong>Inherited</strong></em> or <em><strong>Custom</strong></em> (enter the name). A custom value cannot be empty.</td></tr><tr><td><em><strong>Instance ID</strong></em></td><td>Instance of the virtual machine in the scale set. Shown for entries only, enabled when <em><strong>Scale set</strong></em> is not set to <em><strong>Default</strong></em>, and required when it is set to <em><strong>Custom</strong></em>.</td></tr><tr><td><em><strong>Use entry name as Azure Resource name</strong></em></td><td>Uses the name of the entry as the name of the Azure virtual machine. RDP entries only.</td></tr></tbody></table>

### CyberArk SIA settings

Shown for RDP and SSH terminal entries that use the ***CyberArk SIA*** type. See [CyberArk SIA entry](https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/cyberark-sia-entry.md).

<table><thead><tr><th width="220">SETTING</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>Access mode</strong></em></td><td>How CyberArk Secure Infrastructure Access connects: <em><strong>Zero standing privileges</strong></em> or <em><strong>Vaulted credentials</strong></em>.</td></tr><tr><td><em><strong>Location</strong></em></td><td>Where the target is: <em><strong>On-premises</strong></em> or <em><strong>Cloud</strong></em>. RDP entries with <em><strong>Zero standing privileges</strong></em> only.</td></tr><tr><td><em><strong>Target user</strong></em></td><td>Taken from the username of the entry. Shown with <em><strong>Vaulted credentials</strong></em>.</td></tr><tr><td><em><strong>Address</strong></em></td><td>Taken from the host of the entry.</td></tr><tr><td><em><strong>Target domain</strong></em></td><td>For RDP entries, taken from the domain of the entry, and shown with <em><strong>Vaulted credentials</strong></em> or the <em><strong>Cloud</strong></em> location. For SSH terminal entries with <em><strong>Vaulted credentials</strong></em>, enter the domain.</td></tr><tr><td><em><strong>Network</strong></em></td><td>Name of the CyberArk network of the target. Shown with <em><strong>Vaulted credentials</strong></em>.</td></tr><tr><td><em><strong>Just-in-time elevation with a vaulted credential</strong></em></td><td>Requests a just-in-time elevation of the vaulted account. RDP entries with <em><strong>Vaulted credentials</strong></em> only.</td></tr></tbody></table>

### VPN provider types

The list depends on the operating system, the workspace, the entry type and the add-ons installed. Entry types excluded by the administrator are not listed. On macOS, ***FortiClient IPsec*** and ***Cloudflare Warp*** are not offered; on Linux, the list is shorter and does not include ***Azure Bastion***, ***Tunnelblick***, ***Tailscale VPN***, ***FortiClient IPsec***, ***Cloudflare Warp*** and ***Custom VPN (PowerShell)***.

<table><thead><tr><th width="160">GROUP</th><th>TYPES</th></tr></thead><tbody><tr><td><em><strong>Existing</strong></em></td><td><p>Uses an entry of the vault or a service:</p><ul><li><em><strong>Inherited</strong></em>: the type of the parent folder. Not offered for the vault.</li><li><em><strong>VPN link</strong></em>: a VPN entry of the vault. See <a href="https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/configure-a-vpn-for-multiple-sessions.md">Configure a VPN for multiple sessions</a>.</li><li><em><strong>Session link</strong></em>: another session, opened first. See <a href="https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/configure-a-vpn-with-an-existing-remote-session.md">Configure a VPN with an existing remote session</a>.</li><li><em><strong>SSH link</strong></em>: an <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/ssh-tunnel.md">SSH tunnel</a> entry.</li><li><em><strong>Proxy tunnel</strong></em>: a <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/proxy-tunnel.md">proxy tunnel</a> entry.</li><li><em><strong>Microsoft RD Gateway</strong></em>: a <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/microsoft-rd-gateway.md">Microsoft RD Gateway</a> entry.</li><li><em><strong>Devolutions Gateway tunnel</strong></em>: a <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/devolutions-gateway-tunnel.md">Devolutions Gateway tunnel</a> entry.</li><li><em><strong>Devolutions Gateway</strong></em>: a Devolutions Gateway of the workspace. Offered when the workspace supports Devolutions Gateway and the entry type is supported by it.</li><li><em><strong>Azure Bastion</strong></em>: an Azure Bastion entry.</li><li><em><strong>Jump host</strong></em>: a jump host entry. Not offered for synchronizers.</li><li><em><strong>CyberArk PSM SSH Proxy</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/cyberark-psm-ssh-proxy-entry.md">CyberArk PSM SSH proxy entry</a>.</li><li><em><strong>CyberArk SIA</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/cyberark-sia.md">CyberArk SIA</a>.</li></ul></td></tr><tr><td><em><strong>Configure</strong></em></td><td><p>Configured in the entry itself, with the same settings as the matching VPN entry:</p><ul><li><em><strong>Microsoft VPN</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/windows-built-in-vpn.md">Windows (built-in)</a>.</li><li><em><strong>Cisco VPN</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/cisco-vpn-client-legacy.md">Cisco VPN Client (legacy)</a>.</li><li><em><strong>SonicWall VPN</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/sonicwall-vpn-and-sonicwall-netextender.md">SonicWall VPN and SonicWall NetExtender</a>.</li><li><em><strong>SSH</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/ssh-tunnel.md">SSH tunnel</a>.</li><li><em><strong>Proxy tunnel (HTTP, SOCKS4, SOCKS4A, SOCKS5)</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/proxy-tunnel-vpn.md">Proxy tunnel (VPN)</a>.</li><li><em><strong>FortiClient IPsec</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/forticlient-ipsec.md">FortiClient IPsec</a>.</li><li><em><strong>Tailscale VPN</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/tailscale.md">Tailscale</a>.</li><li><em><strong>Cloudflare Warp</strong></em>: see <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/cloudflare-warp.md">Cloudflare WARP</a>.</li><li><em><strong>Apple VPN</strong></em>, <em><strong>Tunnelblick</strong></em> and <em><strong>Azure Bastion</strong></em>.</li><li>The VPN clients added by add-ons, such as <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/openvpn.md">OpenVPN GUI</a> and <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/wireguard.md">WireGuard</a>. On Windows, optional add-ons are listed only once installed.</li></ul></td></tr><tr><td><em><strong>Custom</strong></em></td><td><ul><li><em><strong>Custom VPN (CMD)</strong></em>: runs a command line or a script. See <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/shell-script-vpn.md">Shell script (VPN)</a>.</li><li><em><strong>Custom VPN (PowerShell)</strong></em>: runs a PowerShell script. See <a href="https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/powershell-script-vpn.md">PowerShell script (VPN)</a>.</li></ul></td></tr></tbody></table>

### Advanced

The ***Advanced*** tab is not shown for VPN entries. Its settings apply only when ***Connect*** is not set to ***Not enabled***, and they cannot be changed with the ***VPN link*** type, which uses the settings of the linked VPN entry.

<table><thead><tr><th width="220">SETTING</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>Go offline on connection</strong></em></td><td>Switches the workspace to offline mode when the VPN opens. See <a href="https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/vpn-with-offline-mode.md">VPN with offline mode</a>.</td></tr><tr><td><em><strong>Go online on disconnect after</strong></em></td><td>Switches the workspace back online when the VPN closes, after the number of seconds entered (0 to 180).</td></tr><tr><td><em><strong>Close connection after</strong></em></td><td>Closes the VPN after the number of minutes entered (0 to 4320).</td></tr><tr><td><em><strong>Use adapter to detect connection</strong></em></td><td>Uses the network adapter of the VPN to detect that the connection is open.</td></tr><tr><td><em><strong>Detect reachable host in wait</strong></em></td><td>During the wait after the VPN opens, stops waiting as soon as the host can be reached.</td></tr><tr><td><em><strong>VPN reconnect mode</strong></em></td><td>What to do with the VPN when the session reconnects: <em><strong>Default</strong></em> (application setting), <em><strong>Reconnect VPN</strong></em> or <em><strong>Leave VPN open</strong></em>.</td></tr><tr><td><em><strong>After execution, wait</strong></em></td><td><p>What Remote Desktop Manager waits for after starting the VPN, before opening the session:</p><ul><li><em><strong>Delay</strong></em>: the number of seconds entered (-1 to 180). This is the default value.</li><li><em><strong>For IP on adapter</strong></em>: until the adapter entered (adapter name, device name, or blank for any) gets an IP address. Set the maximum wait in <em><strong>Wait a maximum of</strong></em> (seconds) and an extra delay in <em><strong>Then delay</strong></em> (milliseconds).</li></ul></td></tr><tr><td><em><strong>Commands</strong></em></td><td>Commands to run after the VPN connects and before it disconnects, such as adding routes. Each command has a <em><strong>Name</strong></em>, an <em><strong>After connection command</strong></em> and a <em><strong>Before disconnecting command</strong></em>; manage them with <em><strong>Add</strong></em>, <em><strong>Edit</strong></em>, <em><strong>Delete</strong></em>, <em><strong>Move up</strong></em> and <em><strong>Move down</strong></em>. Available when <em><strong>After execution, wait</strong></em> is set to <em><strong>For IP on adapter</strong></em>. See <a href="https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/vpn-routing.md">VPN routing</a>.</td></tr><tr><td><em><strong>After connecting, VPN command enabled</strong></em></td><td>Runs the after connection commands.</td></tr><tr><td><em><strong>Before disconnecting, VPN command enabled</strong></em></td><td>Runs the before disconnecting commands.</td></tr><tr><td><em><strong>Run routes in batch (forces elevated privileges)</strong></em></td><td>Runs all the route commands in one batch, which requires elevated privileges.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/common-settings/vpn-tunnel-gateway.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
