> 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/gateway/guides/connect/tunnel-entry.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Devolutions Gateway tunnel entry

Use the Devolutions Gateway tunnel entry in Remote Desktop Manager to open local TCP forward, HTTP proxy or SOCKS5 proxy listeners through the gateway.

The ***Devolutions Gateway tunnel*** entry of Remote Desktop Manager opens local listeners on the user's machine that reach a private network through Devolutions Gateway, like SSH port forwarding but with nothing other than Devolutions Gateway. Use it for tools that have no built-in Devolutions Gateway support in Remote Desktop Manager: any application that can connect to a local port, an HTTP proxy or a SOCKS5 proxy can then use the tunnel while the entry is open.

The entry type is ***Devolutions Gateway tunnel*** (short name ***Gateway tunnel***), in the ***Remote connection*** category of new entries. It is available in Remote Desktop Manager for Windows, macOS and Linux, not on iOS and Android, and it needs no credentials.

## Before you start

* The entry is in a Devolutions Server or Devolutions Cloud workspace with Devolutions Gateway.
* The entry uses the ***Devolutions Gateway*** provider in its ***VPN/tunnel/gateway*** settings, directly or through inheritance. If not, saving shows "The connection must use a Devolutions Gateway VPN. Do you want to continue?". See [Use a gateway in Remote Desktop Manager](https://docs.devolutions.net/gateway/guides/connect/remote-desktop-manager.md).

## Create a tunnel entry

1. In Remote Desktop Manager, create a new entry of type ***Devolutions Gateway tunnel***.
2. In ***VPN/tunnel/gateway***, set ***VPN provider*** to ***Devolutions Gateway*** and pick the gateway, or inherit them from the folder.
3. In ***Listeners***, click ***New*** and set the listener.
4. In ***Allow rules***, click ***New*** for each destination that HTTP and SOCKS5 listeners may reach.
5. Save the entry, then open it.

With Devolutions Cloud, the entry needs at least one TCP forward target or one allow rule: "At least one JMUX rule is expected."

## Listeners

A listener is a local address and port where the tunnel accepts connections. The ***Listeners*** list shows ***Mode***, ***Bind address***, ***Target*** (***Dynamic*** for proxy listeners) and ***Description***.

<table><thead><tr><th width="220">MODE</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>TCP forward</strong></td><td>Forwards one local port to one fixed destination (<em><strong>Target</strong></em>: host and port), like SSH local port forwarding. Default mode of a new listener.</td></tr><tr><td><strong>HTTP proxy</strong></td><td>An HTTP proxy. The application chooses the destination of each connection (dynamic destination), within the allow rules.</td></tr><tr><td><strong>SOCKS5 proxy</strong></td><td>A SOCKS5 proxy. The application chooses the destination of each connection (dynamic destination), within the allow rules. Lets any browser, not only Google Chrome, reach internal websites.</td></tr></tbody></table>

<table><thead><tr><th width="220">SETTINGS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>Mode</strong></td><td><em><strong>SOCKS5 proxy</strong></em>, <em><strong>HTTP proxy</strong></em> or <em><strong>TCP forward</strong></em>.</td></tr><tr><td><strong>Bind address</strong></td><td>Local address and port of the listener. Use <code>127.0.0.1</code> so that only the user's machine can use the tunnel. A port of <code>0</code> picks a free port when the entry opens. Errors: "The bind address is invalid.", "The bind port is invalid."</td></tr><tr><td><strong>Target</strong></td><td>TCP forward only: destination host and port, as seen from Devolutions Gateway. The port must be greater than 0. Errors: "The target address is invalid.", "The target port is invalid."</td></tr><tr><td><strong>Description</strong></td><td>Free text.</td></tr></tbody></table>

{% hint style="danger" %}
A bind address of `0.0.0.0` accepts connections from any machine that can reach the user's computer, and all of that traffic enters the private network under the user's authorization. Keep the bind address on `127.0.0.1` unless you have a specific reason not to.
{% endhint %}

## Allow rules

Allow rules list the destinations that the HTTP and SOCKS5 listeners may reach. Anything that does not match a rule is denied. Each rule has a ***Target filter*** (a host name or IP address, with a port) and a ***Description***.

* A `*` replaces one whole part of a host name (between two dots) or one whole number of an IP address. Rules are compared part by part: `*.windjammer.net` matches `srv.windjammer.net` but not `a.srv.windjammer.net`. A `*` inside a part, such as `srv*`, is not a wildcard.
* The port is part of the rule. A port of `0` allows every port of that host.
* Add a host several times to allow several ports, for example 80 and 443.

<table><thead><tr><th width="260">TARGET FILTER</th><th>ALLOWS</th></tr></thead><tbody><tr><td><code>windjammer.net:80</code></td><td>HTTP to <code>windjammer.net</code>.</td></tr><tr><td><code>*.windjammer.net:443</code></td><td>HTTPS to any host one level below <code>windjammer.net</code>, such as <code>srv.windjammer.net</code>, but not to <code>windjammer.net</code> itself or to <code>a.srv.windjammer.net</code>.</td></tr><tr><td><code>192.168.0.*:22</code></td><td>SSH to any address from <code>192.168.0.0</code> to <code>192.168.0.255</code>.</td></tr><tr><td><code>*:3389</code></td><td>RDP to any host that Devolutions Gateway can reach.</td></tr></tbody></table>

{% hint style="warning" %}
When allow rules use host names, the application must send the host name to the proxy instead of resolving it first; otherwise the proxy receives an IP address that matches no rule and the connection is denied. For example, in Mozilla Firefox, select ***Proxy DNS when using SOCKS v5***. With curl, use the `socks5h://` scheme.
{% endhint %}

## Use the tunnel from another application

While the entry is open, point the application to the listener. When the bind port is `0`, the actual port is shown in the open tunnel tab of Remote Desktop Manager.

```bash
curl -x socks5h://127.0.0.1:1080 http://windjammer.net
```

When the entry opens embedded, the tunnel runs in a Remote Desktop Manager tab. Closing the tab, or Remote Desktop Manager, closes the tunnel.

## Reuse an open tunnel from other entries

Other entries can go through an open tunnel instead of opening their own connection: set their ***VPN provider*** to the existing ***Devolutions Gateway tunnel*** entry. Website entries that use a tunnel have the same browser requirements as website entries that use Devolutions Gateway directly.

## Good to know

* The tunnel carries TCP only.
* Remote Desktop Manager requests a new authorization from Devolutions Server or Devolutions Cloud each time the entry opens, so the gateway permissions and vault restrictions apply to every tunnel.
* The jetsocat tool shipped with Remote Desktop Manager writes its logs in `%APPDATA%\jetsocat` on Windows, in `~/Library/Application Support/jetsocat` on macOS and in `~/.local/share/jetsocat` on Linux.

## Next

* [Use Devolutions Gateway with an external browser](https://docs.devolutions.net/gateway/guides/connect/external-browser.md)
* [Devolutions Gateway tunnel entry settings in Remote Desktop Manager](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/devolutions-gateway-tunnel)


---

# 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/gateway/guides/connect/tunnel-entry.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.
