> For the complete documentation index, see [llms.txt](https://docs.plenit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plenit.com/docs-en/productos/remote-desktop/how-to/how-to-configure-remote-desktop-ports.md).

# How to Configure the Ports of Your Remote Desktop

Expose the ports your applications need with a firewall inbound rule, and reduce the service's exposure.

The usual way to access Remote Desktop is through **HTML5 over port 443/TCP**, encrypted and compatible with modern browsers on Windows, iOS, and GNU/Linux.

Even so, sometimes you need **to publish other ports** so that certain applications work. This guide shows you how to create the inbound rule to do so, while keeping service exposure under control.

> #### 👍 What you get
>
> An inbound rule that publishes the port your application needs, with the source and destination limited so you don't open more than necessary.

### Before you begin

* Access the administration panel at [admin.plenit.com](https://admin.plenit.com) with permissions on the environment.
* Have the Remote Desktop environment deployed. If you don't have it yet, set it up with the [Remote Desktop Quick Start](https://gitlab.com/plenit-group/plenit-docs-es-es/-/blob/v1.0/docs/Productos/servicios-cloud-escritorio-remoto/servicios-cloud-escritorio-remoto-how-to/servicios-cloud-escritorio-remoto-desplegar-escritorio-remoto/README.md).

> #### 🚧 Caution with port 3389
>
> Port **3389/TCP** (RDP) is one of the first ports scanned in an attack. Avoid exposing it openly to the internet: if you need RDP, reach it through a VPN and restrict the source with firewall rules. Publish only the ports that your applications truly require.

### Step 1. Go to the environment firewall

In [admin.plenit.com](https://admin.plenit.com), go to **Cloud Services → Remote Desktop** and enter the environment subscription. Open the tab **Servers** and scroll down to **Firewall — Inbound rules**, where you can see existing rules and create new ones.

![Firewall — Inbound rules section in Servers](https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-21ad6171b207d75260f15047a735b490f09da514%2FCAPTURA%201%20%C2%B7%20pesta%C3%B1a%20Servers%20%C2%B7%20secci%C3%B3n%20Firewall%20%E2%80%94%20Reglas%20de%20entrada.png?alt=media)

> 📘 Also during deployment
>
> You can create the rule when deploying the service or later by editing it. If you're in the deployment flow, you're already in this configuration and can skip the access step.

### Step 2. Create the inbound rule

Click **Create new inbound rule** and fill in the fields with the values your application requires.

![New inbound rule form](https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-f19f3391c479ad9070e75de92f5e2857cdfcb81d%2FCAPTURA%202%20%C2%B7%20formulario%20de%20nueva%20regla%20de%20entrada%20con%20los%20campos%20a%20rellenar.png?alt=media)

**Network and source:**

* **Network**: the network you are working on.
* **Source**: select **IP or Network**. Check **Any IP** to allow access from any source, or enter a **IP** or a **range** to limit it.

**Firewall (public entry):**

* **Protocol**: TCP or UDP, depending on the communication.
* **public IP**: the public IP through which access will be made.
* **Public Port**: the public port you are exposing.

**Server (internal destination):**

* **Private IP**: the private IP of the destination server.
* **Private Port**: the internal port to which traffic is forwarded.

> #### 🚧 Restrict the source whenever you can
>
> "Any IP" opens the port to the entire internet. If you know where the client will connect from, limit the source to its IP or range: that's the difference between publishing a service and exposing it.

When you have filled in the fields, click **Continue** to save the rule.

### Step 3. Verify that the rule was applied

Go back to **Firewall — Inbound rules** and check that the new rule appears in the list with the network, source, protocol, public IP, and ports you defined.

![Inbound rule created in the list](https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-5c32123b7977b260b20b30248af8bc0100804464%2FCAPTURA%203%20%C2%B7%20lista%20de%20reglas%20con%20la%20nueva%20regla%20visible.png?alt=media)

### Conclusion

Publishing a port in Remote Desktop means creating an inbound rule that connects a public port with the internal server and port.

The key is not just opening the port, but doing it carefully: publish only the ones your applications need, restrict the source when you know where the client connects from, and keep RDP's 3389 off the internet by reaching it through a VPN.

That way, you provide the service without expanding the attack surface more than necessary.

### Next steps

* Protect administrative access with a [remote access VPN.](https://docs.plenit.com/docs-en/productos/servers/how-to/how-to-configure-a-remote-access-vpn.md)
* Connect the environment to the client's headquarters through [site-to-site VPN.](https://docs.plenit.com/fr/productos/servers/how-to/how-to-create-a-site-to-site-vpn-tunnel.md)
* Associate users with an existing domain in [How to associate a Remote Desktop user with a domain user.](https://docs.plenit.com/docs-en/productos/remote-desktop/how-to/how-to-associate-an-rd-user-with-a-domain-user.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.plenit.com/docs-en/productos/remote-desktop/how-to/how-to-configure-remote-desktop-ports.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.
