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

# Enrutamiento VPN

Automatice el enrutamiento VPN en Remote Desktop Manager ejecutando comandos posteriores a la conexión y previos a la desconexión para añadir rutas automáticamente.

Establecer una conexión VPN con Remote Desktop Manager es sencillo. Desafortunadamente, añadir rutas debe hacerse manualmente. Hay que esperar a que el adaptador se conecte, encontrar la IP y luego añadir las rutas deseadas. Incluso si utiliza un script (como un script de PowerShell), sigue siendo una tarea redundante y que consume mucho tiempo.

### Solución

Esta función forma parte de un concepto más amplio denominado comandos VPN. Le permite ejecutar cualquier tipo de script o ejecutable después de conectar la VPN y antes de desconectarla.

### Flujo de trabajo

1. Configure la VPN para que espere hasta que el adaptador se conecte y se le asigne una IP (utilizaremos la IP del adaptador para definir las rutas).
2. Haga clic en ***Añadir*** para mostrar el cuadro de diálogo ***Comandos***.
3. Cree una definición de ruta seleccionando el botón de opción ***Ruta (Añadir/Eliminar)***.
4. Establezca la IP y cualquier otra información requerida.


---

# 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/es/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.
