VM: RDP port is blocked by Windows Defender Firewall inbound rules

SK 0 Reputation points
2024-03-06T07:54:39.7633333+00:00

Hi there,

I have used my VM for 3 years (Windows 2016 R) and I have been using RDP.

Today I saw a lot of IP addresses which are trying to log on my VM via RDP so I tried to block them by configuring Windows Defender Firewall inbound rules but I accidentally blocked everything, mine included.

I tried to connect my VM again but every attempts are failed. What I have tried:

a) cmd (ResetRDPCert SetRDPPort), just black screen forever

b) Reset password and configuration : after reset I can't still log on

c) Bastion : connection unstable

d) Change network rules on Portal : inbound/outbound rules

I can't lose anything in my VM because the server is live.

Can anyone please help me? I just need to log on again...

Windows for business | Windows Client for IT Pros | User experience | Remote desktop services and terminal services
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dominique Schluep 410 Reputation points
    2024-03-06T15:23:10.24+00:00

    Hello SK

    You could try to list and deactivate the rule using PowerShell:

    #List enabled rules
    Get-NetFirewallRule | Where-Object {$_.Enabled -eq "True"} | Sort-Object Displayname | Select-Object Displayname
    
    #Disable firewall rule
    Disable-NetFirewallRule -DisplayName <Displayname>
    
    0 comments No comments

  2. Anonymous
    2024-03-07T08:57:49.03+00:00

    Hello,

    I noticed that you are using a portal, are you using a VM from a 3rd party? Their support may help you change your FW rules in portal.

    If you just changed FW rule in your PC, you could run command to reset your firewall "netsh advfirewall reset"


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

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.