How to Open the RDP Port in Windows Server Firewall
Allowing Remote Desktop traffic through Windows Defender Firewall.
Even if Remote Desktop Services is enabled, you cannot connect if the Windows Firewall is blocking the traffic. You must create an Inbound Rule to allow TCP traffic on port 3389.
⚠️ Security Note: RDP uses port 3389 by default. Opening this port to the public internet is a security risk. Ensure you are using a VPN or restricting the rule to specific IP addresses whenever possible.
Method 1: Using Windows Firewall (GUI)
This is the standard method using the graphical interface.
- Open the Start Menu, search for Windows Defender Firewall with Advanced Security, and open it.
- In the left pane, click on Inbound Rules.
- In the right pane (Actions), click New Rule....
- Rule Type: Select Port and click Next.
- Protocol and Ports:
- Select TCP.
- Select Specific local ports and enter
3389. - Click Next.
- Action: Select Allow the connection and click Next.
- Profile: Check Domain, Private, and Public (uncheck Public if you want to restrict internet access) and click Next.
- Name: Enter a name (e.g., "Allow RDP") and click Finish.
Method 2: Using PowerShell (Fastest)
You can create the rule instantly using a single PowerShell command. Run PowerShell as Administrator.
To open the standard RDP port (3389):
New-NetFirewallRule -DisplayName "Allow RDP" -Direction Inbound -LocalPort 3389 -Protocol TCP -Action Allow
Method 3: Using Command Prompt
If you prefer the classic command line (netsh):
netsh advfirewall firewall add rule name="Allow RDP" dir=in action=allow protocol=TCP localport=3389
Author Bio
Microsoft Certified Professional
With over 20 years of experience deploying and managing enterprise Windows Server environments, Keloth leads technical implementation at RDS CAL Store. He specializes in Remote Desktop Services infrastructure, secure remote architecture, and helping IT teams seamlessly scale their official licensing.
Related Posts
How to Create a Remote Desktop User in Windows Server (2016, 2019, 2022 & 2025)
Home – How to Create a Remote Desktop User in Windows Server (2016, 2019, 2022 & 2025) How to Create a Remote Desktop User in Windows Server (2016, 2019, 2022 & 2025) Provisioning remote access for a new employee requires more than just creating a standard Windows account. To securely connect to a Session Host,…
How to Fix the CredSSP “Encryption Oracle Remediation” RDP Error
Home – How to Fix the CredSSP “Encryption Oracle Remediation” RDP Error How to Fix the CredSSP “Encryption Oracle Remediation” RDP Error If you are managing Windows Servers, you have likely encountered this terrifying error message when trying to connect via Remote Desktop: “An authentication error has occurred. The function requested is not supported… This…
How to Configure the RDS “Startup Environment” in Server 2016, 2019, 2022 & 2025
Home – How to Configure the RDS “Startup Environment” in Server 2016, 2019, 2022 & 2025 How to Configure the RDS “Startup Environment” in Server 2016, 2019, 2022 & 2025 If you recently upgraded your infrastructure, you likely noticed a glaring omission: Microsoft removed the Environment, Sessions, and Remote Control tabs from the Active Directory…
How to configure “Licensing Mode” and “License Server to Use” on a Windows Server
Home – How to configure “Licensing Mode” and “License Server to Use” on a Windows Server Configuring RDS Licensing Mode and License Server A guide for Windows Server 2016, 2019, 2022, and 2025. Configuring the Remote Desktop Services (RDS) licensing mode and license server on a Windows Server is a critical step for allowing more…