You must enable the Windows Firewall exception for Remote Desktop

Configuring a Windows Firewall Exception for Remote Desktop

By default, Windows Firewall doesn't allow Remote Desktop connections. This is a sensible security precaution because connecting to someone's desktop gives you nearly complete control over that PC. To enable remote connections, you must configure a Windows Firewall exception for Remote Desktop.

Here are the steps you need to follow:

  1. Select Start, type firewall, and then select Windows Firewall in the search results. The Windows Firewall window appears.
  2. Click the Allow a Program or Feature Through Windows Firewall link.
  3. In Windows 7, click the Change Settings button; in Windows Vista, enter your User Account Control (UAC) credentials to continue.
  4. Activate the check box beside Remote Desktop.
  5. Click OK. Windows enables the firewall exception for Remote Desktop.

[Previous] [Contents] [Next]

How to Enable Remote Desktop Connection in Windows 10

The Remote desktop feature in Microsoft windows 10 allows user to access their Windows 10 PC from a remote Computer using a remote desktop client. Once you enable the remote desktop, you can access your windows 10 computer from anywhere from any device.

By default, remote desktop connection is disabled and blocked by the windows firewall in windows 10. In this tutorial we are going to learn how to enable remote desktop connection in Windows 10 Operating System.

  1. Open System Settings - Right click on the Windows start button and select System from the menu.
  2. Open Remote Desktop Settings - Click on the Remote desktop link on the left to open remote Settings window.
  3. Allow Remote Connections - Under the remote desktop section, Turn "Enable Remote Desktop" on, and then choose Confirm.

MetaLAN

  • Up and running in 5 minutes
  • Agent less - No need to install anything on the endpoints
  • Free download - No registration required

Learn More...

You must enable the Windows Firewall exception for Remote Desktop
You must enable the Windows Firewall exception for Remote Desktop

Windows Firewall: Allow inbound Remote Desktop exceptions

Allows this computer to receive inbound Remote Desktop requests. To do this, Windows Firewall opens TCP port 3389.

If you enable this policy setting, Windows Firewall opens this port so that this computer can receive Remote Desktop requests. You must specify the IP addresses or subnets from which these incoming messages are allowed. In the Windows Firewall component of Control Panel, the "Remote Desktop" check box is selected and administrators cannot clear it.

If you disable this policy setting, Windows Firewall blocks this port, which prevents this computer from receiving Remote Desktop requests. If an administrator attempts to open this port by adding it to a local port exceptions list, Windows Firewall does not open the port. In the Windows Firewall component of Control Panel, the "Remote Desktop" check box is cleared and administrators cannot select it.

If you do not configure this policy setting, Windows Firewall does not open this port. Therefore, the computer cannot receive Remote Desktop requests unless an administrator uses other policy settings to open the port. In the Windows Firewall component of Control Panel, the "Remote Desktop" check box is cleared. Administrators can change this check box."

Supported on: At least Windows XP Professional with SP2


RegistryHiveHKEY_LOCAL_MACHINE
RegistryPathSOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\RemoteDesktop
ValueNameEnabled
ValueTypeREG_DWORD
EnabledValue1
DisabledValue0


Allow unsolicited incoming messages from these IP addresses:

You must enable the Windows Firewall exception for Remote Desktop

RegistryHiveHKEY_LOCAL_MACHINE
RegistryPathSOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\RemoteDesktop
ValueNameRemoteAddresses
ValueTypeREG_SZ
Default Value

Syntax:

Type "*" to allow messages from any network, or

else type a comma-separated list that contains

any number or combination of these:

IP addresses, such as 10.0.0.1

Subnet descriptions, such as 10.2.3.0/24

The string "localsubnet"

Example: to allow messages from 10.0.0.1,

10.0.0.2, and from any system on the

local subnet or on the 10.3.4.x subnet,

type the following in the "Allow unsolicited"

incoming messages from these IP addresses":

10.0.0.1,10.0.0.2,localsubnet,10.3.4.0/24


windowsfirewall.admx

configure windows firewall to allow RDP and Shared folder access through the VPN

Hello.
I have configure Windows Server 2019 Essentials for VPN connections.
I'm able to connect to the server using the VPN, but I'm unable to make an RDP connection or to access the shared folder, unless I disable the Windows firewall public profile.
I can't point which rule is blocking the access, or which one to enable or create to allow it, or is there a way to get a live monitoring that would tell me whhy the inbound connection has been denied.
Thank you

windows-server

Comment

Comment Show 0

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick answered May 10, '21 | DSPatrick commented May 12, '21

Well actually not "my" way but the "microsoft windows" way to define firewall rules. You might try some firewall logging in case some custom ports have been set.

You must enable the Windows Firewall exception for Remote Desktop



--please don't forget to Accept as answer if the reply is helpful--






image.png (54.6 KiB)

Comment

Comment · Show 16

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlainBensimon-7109 · May 10, 2021 at 11:48 PM

So below is the log of the firewall. You can see when it's dropped (firewall is on "blocked (default) and allow when firewall is on "allow"
I was connecting to the shared folder

You must enable the Windows Firewall exception for Remote Desktop


0 Votes 0 ·

image.png (65.7 KiB)

DSPatrick AlainBensimon-7109 · May 11, 2021 at 12:00 AM

Looks like TCP 445 is still blocked.


--please don't forget to Accept as answer if the reply is helpful--




0 Votes 0 ·

AlainBensimon-7109 DSPatrick · May 11, 2021 at 12:36 AM

I just created a rule for 445 as well, but still no success.

0 Votes 0 ·

Show more comments

DSPatrick answered May 9, '21 | AlainBensimon-7109 edited May 9, '21

File sharing == TCP ports 445,139 and UDP ports 137, 138
RDP == port 3389

--please don't forget to Accept as answer if the reply is helpful--





Comment

Comment · Show 1

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlainBensimon-7109 · May 09, 2021 at 10:35 PM

Yes I know that, and all those native rules are enabled, but it's not working.

You must enable the Windows Firewall exception for Remote Desktop

You must enable the Windows Firewall exception for Remote Desktop

The only way to make it work is to set the inbound connections to allow, but I assumed that if I put it on "block (default)", t will block all connections except the ones that the rules allowed.

You must enable the Windows Firewall exception for Remote Desktop


0 Votes 0 ·

image.png (38.5 KiB)

image.png (60.6 KiB)

image.png (20.8 KiB)

DSPatrick answered May 9, '21 | AlainBensimon-7109 commented May 9, '21

That isn't quite right

Start > Run and type firewall. ...
Click on the Advanced Settings in the left pane. ...
Click on the Inbound Rules
In left pane, click on New rule.
Under Rule Type select option Port and click next.
Select TCP and or UDP specific local ports options.
Allow the connection
Select the profile in use
Give the rule some meaningful name



--please don't forget to Accept as answer if the reply is helpful--




Comment

Comment · Show 1

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlainBensimon-7109 · May 09, 2021 at 11:59 PM

I tried your way, even though I was skeptical since the Microsoft native rules are exactly the same, but it didn't work either.

0 Votes 0 ·

CandyLuo-MSFT answered May 10, '21 | AlainBensimon-7109 commented May 10, '21

Hi ,

Try to add the subnet of your VPN clients in Remote IP address section for File and Printer Sharing rules and then see if you can access shared folder. As picture below:

You must enable the Windows Firewall exception for Remote Desktop

Best Regards,
Candy


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




image.png (51.2 KiB)

Comment

Comment · Show 1

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlainBensimon-7109 · May 10, 2021 at 11:51 PM

Hello.
I have tried this, and it didn't help.

0 Votes 0 ·

DSPatrick answered May 10, '21 | AlainBensimon-7109 commented May 10, '21

Just checking if there's any progress or updates?

--please don't forget to Accept as answer if the reply is helpful--




Comment

Comment · Show 1

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlainBensimon-7109 · May 10, 2021 at 11:59 PM

I've answered you up there.

0 Votes 0 ·

Remote Desktop cannot connect to the VDI-based remote computer after enabling Microsoft RemoteFX 3D Video Adapter

Trang này có hữu ích không?

Có Không

Bạn còn phản hồi nào nữa không?

Ý kiến phản hồi sẽ được gửi đến Microsoft: Bằng cách nhấn nút gửi, ý kiến phản hồi của bạn sẽ được sử dụng để cải thiện các sản phẩm và dịch vụ của Microsoft. Chính sách về quyền riêng tư.

Gửi

Trong bài viết này

This article provides a solution to an issue where Remote Desktop can't connect to a Virtual Desktop Infrastructure (VDI)-based remote computer.

Applies to: Windows 7 Service Pack 1, Windows Server 2008 R2 Service Pack 1
Original KB number: 2820155