> 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/integrations/remote-access/openvpn.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# OpenVPN

Open OpenVPN connections from Remote Desktop Manager with an OpenVPN GUI or OpenVPN Connect VPN entry, and start them before your remote sessions.

OpenVPN integrates with Remote Desktop Manager through the ***VPN/tunnel/gateway*** entry type, with the OpenVPN GUI type to define a connection or reuse an existing configuration file, and the OpenVPN Connect type to connect with a profile.

## Prerequisites

* Available on Remote Desktop Manager Windows and Linux for OpenVPN GUI, and on Windows and macOS for OpenVPN Connect.
* On Windows, OpenVPN GUI installed on the computer.
* On Linux, the OpenVPN 3 Linux client (`openvpn3`) installed on the computer. On Linux, the OpenVPN GUI type is named OpenVPN.
* For OpenVPN Connect, the OpenVPN Connect application installed on the computer. On Windows, the OpenVPN Connect add-on must be activated in ***Tools*** – ***Extensions manager*** – ***VPN/tunnel/gateway***.
* An OpenVPN configuration file, or the server, certificate and key details to define the configuration in the entry.

## What you can do

* Define the OpenVPN configuration in the entry (***Custom*** configuration type): servers, protocol, device, ciphers, certificates, TLS key and authentication options.
* Use an OpenVPN configuration file that already exists (***Existing*** configuration type), or import one into the entry and export the entry configuration.
* Provide the certificates as separate files or as a single PKCS #12 file.
* Enter the username, password and key password automatically when the VPN opens (***Enable automatic authentication*** and ***Enable automatic key password entry***).
* Run commands after the VPN connects and before it disconnects, wait for an IP address on a network adapter, and choose how the VPN reconnects.
* Close the VPN automatically after a delay, and switch Remote Desktop Manager to offline mode while the VPN is connected.
* Open the VPN before a session with the ***VPN link*** type of the session entry, and share one VPN between several sessions by setting it once on a folder: the sessions of that folder set to ***Inherited*** reuse the same VPN.
* Connect with an OpenVPN Connect profile, stored as a file on the computer or as data in the entry (OpenVPN Connect type). See [OpenVPN Connect entry settings](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/openvpn-connect.md).

## Configure OpenVPN

1. Click ***Add new entry*** and select the OpenVPN GUI entry in the ***VPN/tunnel/gateway*** category.
2. Enter a name for the entry and choose a folder.
3. In the ***Connection*** tab, in the ***General*** sub-tab, select the ***Configuration type***: ***Custom*** or ***Existing***.
4. For ***Existing***, select the ***File*** of the OpenVPN configuration. Check ***Use as configuration file path*** to use the folder of the file as the OpenVPN GUI configuration folder.
5. For ***Custom***, use ***Add*** to list at least one server in ***Host***. Select the ***Certificate file format*** (***Individual*** or ***PKCS12***) and enter the ***CA Certificate***, ***Client certificate*** and ***Client Key*** files, or the ***PKCS #12 file***.
6. For ***Custom***, set the ***Device***, ***Protocol***, ***Cipher*** and ***Data ciphers***, and the ***TLS Key*** if the server requires one. Check ***Use authentication*** if the server asks for a username and password. Use ***Import***, ***Export*** and ***Additional parameters*** for the settings that the options do not cover.
7. In the ***Login*** sub-tab, check ***Enable automatic authentication***, click ***Set authentication*** and enter the username and password. Check ***Enable automatic key password entry*** and click ***Set key password*** if the private key has a passphrase.
8. Optionally, in the ***Advanced*** tab of the entry, set ***Go offline on connection***, ***Close connection after***, ***VPN reconnect mode*** and the other options of the VPN.
9. Click ***Save*** (***Create*** on macOS).

{% hint style="info" %}
On Windows, automatic authentication uses simulated key presses to enter the credentials in the OpenVPN GUI login window. After the VPN is launched, do not press anything until the authentication completes or the timeout expires. On Linux, Remote Desktop Manager answers the prompts of the OpenVPN 3 Linux client with the stored credentials, or asks for them.
{% endhint %}

## Use OpenVPN

### Open the VPN

1. Open the VPN entry. Remote Desktop Manager starts the OpenVPN connection.
2. To close the VPN automatically, set ***Close connection after*** in the ***Advanced*** tab of the entry before you open it.

### Open the VPN before a session

1. Create or open the session entry that needs the VPN.
2. In the entry properties, select ***Connection*** – ***VPN/tunnel/gateway***.
3. Set ***Connect*** (***When to connect*** on Linux, ***Open*** on macOS) to ***Always connect***, or to another mode that matches when the VPN must open.
4. Set ***VPN provider*** (***Connect through*** on Linux, ***Type*** on macOS) to ***VPN link*** and select the OpenVPN entry for your operating system in ***Windows***, ***macOS*** or ***Linux***. See [Configure a VPN for multiple sessions](https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/configure-a-vpn-for-multiple-sessions.md).
5. Open the session.

To share the VPN, set the VPN link, when to connect, when to disconnect and the ***VPN group*** on the folder (Windows: ***Connect***, ***VPN provider***, ***Disconnect***; Linux: ***Connect through***, ***When to connect***, ***When to disconnect***; macOS: ***Open***, ***Type***, ***Close***), then set the sessions to ***Inherited***. On Windows and Linux, enter a ***VPN group*** so that, with ***On session close***, the VPN stays open until its last session closes.

## Integration level

OpenVPN is an integration level 2 – Moderate support integration. See [Integration levels](https://docs.devolutions.net/resources/integration-levels).

#### See also

* [OpenVPN GUI entry settings](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/openvpn.md)
* [OpenVPN Connect entry settings](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/openvpn-connect.md)
* [VPN/tunnel/gateway](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/common-settings/vpn-tunnel-gateway.md)
* [Configure a VPN for multiple sessions](https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/configure-a-vpn-for-multiple-sessions.md)
* [OpenVPN enters wrong credentials](https://docs.devolutions.net/rdm/knowledge-base/troubleshooting-articles/openvpn-enters-wrong-credentials.md)
* [OpenVPN loses connection at launch](https://docs.devolutions.net/rdm/knowledge-base/troubleshooting-articles/openvpn-loses-connection-at-launch.md)


---

# 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/integrations/remote-access/openvpn.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.
