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

# Routage VPN

Automatisez le routage VPN dans Remote Desktop Manager en exécutant des commandes après la connexion et avant la déconnexion pour ajouter des routes automatiquement.

Établir une connexion VPN à l'aide de Remote Desktop Manager est simple. Malheureusement, l'ajout de routes doit être fait manuellement. Attendre que l'adaptateur se connecte, trouver l'IP, puis ajouter les routes désirées. Même si vous utilisez un script (comme un script PowerShell), cela demeure une tâche redondante et qui prend du temps.

### Solution

Cette fonctionnalité fait partie d'un concept plus large appelé Commandes VPN. Elle vous permet d'exécuter tout type de script ou d'exécutable après la connexion VPN et avant la déconnexion VPN.

### Processus

1. Configurez le VPN pour qu'il attende que l'adaptateur se connecte et obtienne une IP attribuée (nous utiliserons l'IP de l'adaptateur pour définir les routes).
2. Cliquez sur ***Ajouter*** pour afficher le dialogue ***Commandes***.
3. Créez une définition de route en sélectionnant l'élément radio ***Route (Ajouter/Supprimer)***.
4. Définissez l'IP et toute autre information requise.


---

# 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/fr/knowledge-base/how-to-articles/vpn-routing.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.
