> 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/how-to-articles/vpn-routing.md).

# VPN routing

Establishing a VPN connection using Remote Desktop Manager is simple. Unfortunately, adding routes has to be done manually. Wait for the adapter to connect, find the IP, then add the desired routes. Even if you use a script (such as a PowerShell script), it remains a redundant, time consuming task.

<figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4601.png" alt=""><figcaption></figcaption></figure>

### Solution

This feature is part of a larger concept called VPN Commands. It allows you to run any type of script or executable post-VPN-connect and pre-VPN-disconnect.

<figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4602.png" alt=""><figcaption></figcaption></figure>

### Workflow

1. Configure the VPN to wait until the adapter connects and gets assigned an IP (we will be using the adapter’s IP to define the routes).
2. Click on ***Add*** to display the ***Commands*** dialog.
3. Create a route definition by selecting the ***Route (Add/Remove)*** radio item.
4. Set the IP and any other required information.

   <figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4603.png" alt=""><figcaption></figcaption></figure>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/vpn-routing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
