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

# Ports and firewall

Ports and connection directions to allow in firewalls for Devolutions Gateway with Remote Desktop Manager, Devolutions Server and Devolutions Cloud.

***Devolutions Gateway*** only needs inbound connections from the clients and servers that use it, and outbound connections to the target hosts. This page lists every port, who connects to it and why, so you can write the firewall rules. Default ports can be changed in `gateway.json`; see [Configuration file (gateway.json)](https://docs.devolutions.net/gateway/reference/configuration.md).

## Inbound connections to Devolutions Gateway

<table><thead><tr><th width="160">PORT</th><th width="240">FROM</th><th>USED FOR</th></tr></thead><tbody><tr><td><strong>7171/TCP</strong> (HTTPS listener)</td><td>Remote Desktop Manager</td><td>Website, PowerShell over WinRM, Telnet, HP iLO and Devolutions Gateway tunnel entries (WebSocket tunnels), session recordings sent to Devolutions Gateway, Kerberos through the KDC proxy, network scans from the gateway, and the health check of the gateway.</td></tr><tr><td><strong>7171/TCP</strong></td><td>Web browsers</td><td>Sessions opened in the browser from Devolutions Server, Devolutions Cloud or the standalone web application, recording playback and live shadowing. The browser connects to Devolutions Gateway directly, not through Devolutions Server.</td></tr><tr><td><strong>7171/TCP</strong></td><td>Devolutions Server</td><td>Health checks, diagnostics, logs, active sessions and their termination, revocation list, configuration publishing, centralized updates, the list of Agent Tunnel agents, and traffic events.</td></tr><tr><td><strong>7171/TCP</strong></td><td>Devolutions Cloud</td><td>The browser of the administrator (health, logs, sessions in <em><strong>Administration</strong></em> – <em><strong>Devolutions Gateway</strong></em>) and the Devolutions Cloud PAM service (<em><strong>Test connection</strong></em>, updates, agent list, recording deletion).</td></tr><tr><td><strong>7171/TCP</strong></td><td>Devolutions Password Manager</td><td>RDP and SSH sessions opened in Devolutions Password Manager.</td></tr><tr><td><strong>8181/TCP</strong> (TCP listener)</td><td>Remote Desktop Manager</td><td>Native RDP, SSH, SFTP, SCP, VNC, Apple Remote Desktop, port forward, PowerShell over SSH and Active Directory console sessions.</td></tr><tr><td><strong>4433/UDP</strong></td><td>Devolutions Agent</td><td>Agent Tunnel (QUIC), only when <code>AgentTunnel.Enabled</code> is <code>true</code>. The agent connects out; its own network needs no inbound port. See <a href="https://docs.devolutions.net/gateway/guides/connect/agent-tunnel.md">Agent tunnel</a>.</td></tr></tbody></table>

Remote Desktop Manager connects to Devolutions Gateway directly; the session doesn't go through Devolutions Server or Devolutions Cloud. Devolutions Server or Devolutions Cloud only issue a short-lived token, which Devolutions Gateway verifies with the provisioner public key (`provisioner.pem`) before it opens the session.

## Outbound connections from Devolutions Gateway

<table><thead><tr><th width="220">DESTINATION</th><th>PORTS AND USE</th></tr></thead><tbody><tr><td><strong>Target hosts</strong></td><td>The port of each session. Defaults: RDP 3389, SSH, SFTP and SCP 22, VNC and Apple Remote Desktop 5900, Telnet 23, PowerShell over WinRM 5985 (HTTP) and 5986 (HTTPS), HTTP 80, HTTPS 443, LDAP 389, LDAPS 636. Between Devolutions Gateway and the target, the session uses the target's own protocol, so secure that protocol itself.</td></tr><tr><td><strong>Kerberos KDC</strong></td><td>Port 88 by default, TCP or UDP, for the KDC proxy. See <a href="https://docs.devolutions.net/gateway/guides/connect/kdc-proxy.md">Use the KDC proxy</a>.</td></tr><tr><td><strong>Hosts of a network scan</strong></td><td>Ping, broadcast, mDNS, NetBIOS and DNS, plus TCP probes on ports 22, 23, 80, 443, 389, 636, 3283, 3389, 5900, 5985 and 5986 by default. See <a href="https://docs.devolutions.net/gateway/guides/network-scan.md">Network scan</a>.</td></tr><tr><td><strong>ngrok</strong></td><td>Only when <code>Ngrok</code> is configured: the ngrok service on the internet.</td></tr><tr><td><strong>Subscriber URL</strong></td><td>Only when <code>Subscriber</code> is configured: session notifications to that URL.</td></tr><tr><td><strong>Outbound proxy</strong></td><td>When <code>Proxy</code> or the system proxy is configured, outbound HTTP requests go through it.</td></tr></tbody></table>

Devolutions Gateway needs no outbound connection to Devolutions Server or Remote Desktop Manager. It doesn't connect to Devolutions Cloud either: with Devolutions Cloud, the users' browsers, Remote Desktop Manager and the Devolutions Cloud PAM service connect to Devolutions Gateway.

## Connections between the other components

<table><thead><tr><th width="300">CONNECTION</th><th>DEFAULT PORT</th></tr></thead><tbody><tr><td>Browser to Devolutions Server</td><td>443/TCP</td></tr><tr><td>Devolutions Server to Devolutions Gateway</td><td>7171/TCP</td></tr><tr><td>Remote Desktop Manager to Devolutions Gateway</td><td>7171/TCP and 8181/TCP</td></tr><tr><td>Devolutions Gateway to target host</td><td>The protocol's port, for example 3389 for RDP or 22 for SSH</td></tr></tbody></table>

In the standalone web application, the browser also checks `https://devolutions.net/products.htm` for a newer Devolutions Gateway version. Blocking it only hides the update notice.

## Firewall rules created by the installers

* **Windows installer.** Adds two Windows Defender Firewall exceptions for the program `DevolutionsGateway.exe`, one for TCP and one for UDP, for all network profiles and any address. They follow the program, not the port, so they keep working when you change ports.
* **Linux packages and Docker image.** Don't change the firewall. Open the ports yourself, for example with `ufw allow 7171/tcp` and `ufw allow 8181/tcp` on Ubuntu, or `firewall-cmd --add-port=7171/tcp --permanent` on Red Hat Enterprise Linux and Rocky Linux. The Docker image exposes ports 7171 and 8181.

## Reverse proxies, load balancers and NAT

* Pass WebSocket upgrades on the HTTPS listener: sessions in the browser, tunnels from Remote Desktop Manager and session recordings use WebSockets.
* Devolutions Gateway ends a plain HTTP request that takes more than 15 seconds with 408 Request Timeout. WebSocket connections aren't affected once open.
* Keep the TCP listener (8181) reachable without TLS termination: Remote Desktop Manager sends its own protocol on it.
* Set the `ExternalUrl` of each listener to the address clients use, so Devolutions Server and Devolutions Cloud fill in the right values with ***Auto-Detect***.
* Point load balancer health probes at `https://<gateway>:7171/jet/health`. It needs no token and answers "Devolutions Gateway "{hostname}" is alive and healthy.".

Setups: [Side-by-side with Devolutions Server in IIS](https://docs.devolutions.net/gateway/guides/reverse-proxies/iis-side-by-side.md), [Cloudflare](https://docs.devolutions.net/gateway/guides/reverse-proxies/cloudflare.md), [Ngrok](https://docs.devolutions.net/gateway/guides/reverse-proxies/ngrok.md).

## Paths on the HTTP listener

A reverse proxy or web application firewall in front of Devolutions Gateway must forward these paths, with WebSocket upgrades. Devolutions Gateway doesn't ask for a token on these paths, so a web application firewall must not require one there: `/health`, `/jet/health` and `/jet/diagnostics/clock` (diagnostics); `/`, `/jet/webapp` and `/jet/webapp/client` and `/jet/webapp/client/…` (standalone web application files); `/jet/webapp/app-token` (sign-in to the standalone web application, with its own login method); `/jet/jrec/play` and `/jet/jrec/play/…` (recording player and its files); `/jet/rdp` (RDP in the browser, which authenticates inside the connection); `/KdcProxy/…` and `/jet/KdcProxy/…` (KDC proxy). The other paths need a token from Devolutions Server, Devolutions Cloud or the standalone web application.

<table><thead><tr><th width="300">PATH</th><th>USED FOR</th></tr></thead><tbody><tr><td><code>/jet/health</code></td><td>Health check, without a token. Answers "Devolutions Gateway "{hostname}" is alive and healthy.", or the ID, host name and version with the header <code>Accept: application/json</code>.</td></tr><tr><td><code>/jet/diagnostics/clock</code></td><td>Time of the gateway, no token.</td></tr><tr><td><code>/jet/heartbeat</code></td><td>Status read by Devolutions Server and Devolutions Cloud: ID, host name, version, Devolutions Agent version when installed, number of running sessions, whether the recording folder is writable, and the total and free space of the recording disk (network shares included).</td></tr><tr><td><code>/jet/diagnostics/configuration</code>, <code>/jet/diagnostics/logs</code></td><td>ID, host name, version and listener URLs (never the full configuration), and the latest log file.</td></tr><tr><td><code>/jet/config</code>, <code>/jet/jrl</code></td><td><em><strong>Publish Gateway configuration</strong></em> and <em><strong>Publish revocation list</strong></em>.</td></tr><tr><td><code>/jet/sessions</code>, <code>/jet/session/{id}/terminate</code>, <code>/jet/preflight</code></td><td>Running sessions, session termination, and the checks before a session opens.</td></tr><tr><td><code>/jet/jmux</code>, <code>/jet/rdp</code>, <code>/jet/fwd/tcp/{id}</code>, <code>/jet/fwd/tls/{id}</code></td><td>Sessions: tunnels from Remote Desktop Manager, RDP in the browser, and other browser sessions.</td></tr><tr><td><code>/jet/jrec/…</code></td><td>Session recordings: sending, listing, downloading, deleting, the recording player (<code>/jet/jrec/play</code>) and live shadowing.</td></tr><tr><td><code>/KdcProxy/…</code>, <code>/jet/KdcProxy/…</code></td><td>KDC proxy (Kerberos).</td></tr><tr><td><code>/jet/net/…</code></td><td>Network scan.</td></tr><tr><td><code>/jet/traffic/…</code></td><td>Traffic events collected by Devolutions Server.</td></tr><tr><td><code>/jet/update</code>, <code>/jet/update/schedule</code></td><td>Updates through Devolutions Agent.</td></tr><tr><td><code>/jet/tunnel/…</code></td><td>Agent Tunnel enrollment and agent list.</td></tr><tr><td><code>/jet/webapp/…</code>, <code>/</code></td><td>Standalone web application. <code>/</code> redirects to <code>/jet/webapp/client</code> when the web application is enabled.</td></tr></tbody></table>

## Clock synchronization

Tokens are valid for a short time and Devolutions Gateway accepts a clock difference of up to 5 minutes. Devolutions Server reports "We detected a clock desynchronization between your Devolutions Server and Devolutions Gateway. Your Devolutions Gateway might be slow or unresponsive." when the difference is over 30 seconds. Keep the clocks of Devolutions Gateway, Devolutions Server and the clients synchronized, for example with NTP. `https://<gateway>:7171/jet/diagnostics/clock` returns the time of Devolutions Gateway without a token.

## Next

* [System requirements](https://docs.devolutions.net/gateway/reference/system-requirements.md)
* [Harden Devolutions Gateway](https://docs.devolutions.net/gateway/for-administrators/hardening.md)
* [Devolutions Gateway troubleshooting](https://docs.devolutions.net/gateway/help/troubleshooting/general.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/gateway/reference/ports-and-firewall.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.
