# How to Open Ports in Windows RDP

To use Remote Desktop Protocol (RDP) on a Windows machine, you may need to allow specific ports through the Windows Firewall. By default, RDP uses port **3389**. Here’s how to open this port:

### Step-by-Step Guide

#### 1. Open Windows Firewall Settings

* Press **Windows Key + R** to open the Run dialog.
* Type `firewall.cpl` and press **Enter**.

{% hint style="info" %}
You can also access the firewall settings through the Control Panel under "System and Security."
{% endhint %}

#### 2. Navigate to Advanced Settings

* In the Windows Firewall window, click on **Advanced settings** on the left panel. This opens the Windows Firewall with Advanced Security.

#### 3. Create a New Inbound Rule

* In the left pane, click on **Inbound Rules**.
* In the right pane, click on **New Rule**.

#### 4. Configure the Rule

* Select **Port** and click **Next**.
* Choose **TCP** and specify the port number:
  * **Specific local ports**: Enter `3389` (or any other port you want to use for RDP).
* Click **Next**.

{% hint style="info" %}
If you're using a different port for RDP, replace `3389` with your chosen port.
{% endhint %}

#### 5. Allow the Connection

* Choose **Allow the connection** and click **Next**.

#### 6. Specify When the Rule Applies

* Select when to apply the rule:
  * Domain
  * Private
  * Public
* Choose the options that suit your network environment and click **Next**.

#### 7. Name the Rule

* Give your rule a name (e.g., "Allow RDP") and an optional description.
* Click **Finish** to create the rule.

#### 8. Confirm the Rule is Active

* Ensure that the new rule appears in the **Inbound Rules** list and is enabled.

{% hint style="success" %}
You've successfully allowed the RDP port through the Windows Firewall!
{% endhint %}

### Additional Considerations

* If you're connecting from outside your local network, ensure that your router is also configured to forward the RDP port.

{% hint style="warning" %}
Opening ports can expose your computer to security risks. Make sure to use strong passwords and consider using a VPN or other security measures when enabling RDP.
{% endhint %}

### Conclusion

By following these steps, you can successfully allow RDP ports through the Windows Firewall, enabling remote access to your machine. Always ensure to follow best security practices to protect your system.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clouduxe.com/vps-and-dedicated-servers/connecting-to-a-windows-server-via-remote-desktop-protocol-rdp/how-to-open-ports-in-windows-rdp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
