> 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/wireguard.md).

# WireGuard

Configure WireGuard VPN entries in Remote Desktop Manager, including a linked configuration file or a custom tunnel with addresses, DNS, peers, and commands.

This article details the many settings and options available for ***WireGuard*** VPN entries in Remote Desktop Manager.

{% hint style="info" %}
Remote Desktop Manager opens and closes the WireGuard tunnel by installing and uninstalling a WireGuard tunnel service. When Remote Desktop Manager does not run with elevated privileges, Windows asks to elevate the WireGuard process.
{% endhint %}

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>SETTINGS</strong></td><td><strong>DESCRIPTION</strong></td></tr><tr><td><strong>Name</strong></td><td>The name of the entry.</td></tr><tr><td><strong>Folder</strong></td><td>The folder where the entry is located.</td></tr><tr><td><strong>Display</strong></td><td>How the entry opens. VPN entries open as <em><strong>External</strong></em>, and the list cannot be changed. Additional lists let you choose the monitor and the virtual desktop where the window opens.</td></tr><tr><td><strong>VPN type</strong></td><td>The type of VPN of the entry. <em><strong>WireGuard</strong></em> is selected for this entry. Selecting another type replaces the settings of the <em><strong>Connection</strong></em> tab.</td></tr></tbody></table>

### Connection

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Configuration mode</strong></td><td><p>Select where the WireGuard configuration comes from:</p><ul><li><strong>Custom</strong> — the tunnel is defined in the entry, on the <em><strong>General</strong></em>, <em><strong>Peers</strong></em>, and <em><strong>Commands</strong></em> sub-tabs.</li><li><strong>Link to file</strong> — the entry uses an existing WireGuard configuration file.</li></ul></td></tr></tbody></table>

The rest of the ***Connection*** tab holds the ***General*** sub-tab, plus the ***Peers*** and ***Commands*** sub-tabs when ***Configuration mode*** is set to ***Custom***.

**General**

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>File</strong></td><td>The WireGuard configuration file. Visible and required when <em><strong>Configuration mode</strong></em> is set to <em><strong>Link to file</strong></em>.</td></tr><tr><td colspan="2">The settings below are visible when <em><strong>Configuration mode</strong></em> is set to <em><strong>Custom</strong></em>.</td></tr><tr><td><strong>Tunnel name</strong></td><td>The name of the WireGuard tunnel. Required.</td></tr><tr><td><strong>Addresses</strong></td><td>The addresses of the interface, one per line.</td></tr><tr><td><strong>DNS</strong></td><td>The DNS servers of the interface, one per line. Required unless <em><strong>Use empty DNS</strong></em> is checked.</td></tr><tr><td><strong>Use empty DNS</strong></td><td>Do not set DNS servers for the interface. Disables the <em><strong>DNS</strong></em> field.</td></tr><tr><td><strong>Private key</strong></td><td>The private key of the interface.</td></tr><tr><td><strong>Override listening port</strong></td><td>Check to set the listening port of the interface in the field below, from 0 to 65535.</td></tr><tr><td><strong>Table</strong></td><td><p>Select the routing table setting of the interface:</p><ul><li><strong>auto</strong></li><li><strong>Off</strong></li><li><strong>Custom</strong> — enter the table number in the field next to the list.</li></ul></td></tr><tr><td><strong>Override MTU</strong></td><td>Check to set the MTU of the interface in the field below, from 0 to 65535. The value is 1420 by default.</td></tr></tbody></table>

**Peers**

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Peers</strong></td><td>The list of peers, with their <em><strong>Endpoint</strong></em>, <em><strong>Public key</strong></em>, and <em><strong>Keep alive</strong></em>. Use the toolbar to <em><strong>Add</strong></em>, <em><strong>Edit</strong></em>, or <em><strong>Delete</strong></em> a peer. The <em><strong>Peer settings</strong></em> window holds the <em><strong>Endpoint</strong></em>, the <em><strong>Allowed IPs</strong></em>, the <em><strong>Public key</strong></em>, the <em><strong>Pre-shared key</strong></em>, and the <em><strong>Keep alive</strong></em> interval (0 to 65535).</td></tr></tbody></table>

**Commands**

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Commands</strong></td><td><p>The list of commands to run with the tunnel, in order. Use the toolbar to <em><strong>Add</strong></em>, <em><strong>Edit</strong></em>, <em><strong>Delete</strong></em>, <em><strong>Move up</strong></em>, or <em><strong>Move down</strong></em> a command. Each command has a <em><strong>Command</strong></em> and a <em><strong>Command type</strong></em>:</p><ul><li><strong>Before the interface is brought up</strong></li><li><strong>After the interface is brought up</strong></li><li><strong>Before the interface is brought down</strong></li><li><strong>After the interface is brought down</strong></li></ul></td></tr></tbody></table>

### Advanced

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Go offline on connection</strong></td><td>Switch Remote Desktop Manager to offline mode when the VPN connects.</td></tr><tr><td><strong>Close connection after (min)</strong></td><td>Close the VPN automatically after the set number of minutes, from 0 to 4320.</td></tr><tr><td><strong>Detect reachable host in wait</strong></td><td>While waiting for the VPN, detect whether the host can already be reached.</td></tr><tr><td><strong>VPN reconnect mode</strong></td><td><p>Select the reconnect behavior of the VPN:</p><ul><li><strong>Default</strong></li><li><strong>Reconnect VPN</strong></li><li><strong>Leave VPN open</strong></li></ul></td></tr><tr><td><strong>Go online on disconnect after (sec)</strong></td><td>Switch Remote Desktop Manager back to online mode the set number of seconds after the VPN disconnects, from 0 to 180.</td></tr><tr><td><strong>Use adapter to detect connection</strong></td><td>Use the network adapter to detect whether the VPN is connected.</td></tr><tr><td colspan="2"><strong>After execution, wait</strong></td></tr><tr><td><strong>After execution, wait</strong></td><td><p>What Remote Desktop Manager waits for after starting the VPN:</p><ul><li><strong>Delay</strong> — Waits for the set number of seconds, from -1 to 180.</li><li><strong>For IP on adapter</strong> — Waits for an IP address on the network adapter. Enter the adapter name or device name, or click the browse button to select it. The field can be left blank. <em><strong>Wait a maximum of</strong></em> sets the maximum wait in seconds (-1 to 180), and <em><strong>Then delay</strong></em> adds a delay in milliseconds (-1 to 180000).</li></ul></td></tr><tr><td colspan="2"><strong>Commands</strong></td></tr><tr><td><strong>Commands</strong></td><td>The list of VPN commands, with their <em><strong>Name</strong></em>, <em><strong>After connection command</strong></em>, and <em><strong>Before disconnecting command</strong></em>. Use the toolbar to <em><strong>Add</strong></em>, <em><strong>Edit</strong></em>, <em><strong>Delete</strong></em>, <em><strong>Move up</strong></em>, or <em><strong>Move down</strong></em> a command.<br><br>The settings of the <em><strong>Commands</strong></em> section are available when <em><strong>After execution, wait</strong></em> is set to <em><strong>For IP on adapter</strong></em>. They are not supported on macOS.</td></tr><tr><td><strong>After connecting, VPN command enabled</strong></td><td>Run the after connection commands once the VPN is connected.</td></tr><tr><td><strong>Before disconnecting, VPN command enabled</strong></td><td>Run the before disconnecting commands before the VPN disconnects.</td></tr><tr><td><strong>Run routes in batch (forces elevated privileges)</strong></td><td>Run the routes in a batch. This option requires elevated privileges.</td></tr></tbody></table>

### See also

* [VPN/tunnel/gateway](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/network-access.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/knowledge-base/knowledge-base-articles/entry-settings/wireguard.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.
