3

I have an Azure virtual machine running Windows Server 2012.

Mistakenly changed the windows firewall setting to Block all incoming connection including those in the allowed list

enter image description here

Now i am unable to take the RDP of the VM. so i can't reverse the option also

I tried reset the RDP configuration from the Azure portal but that also did not help..

How can i revert the change to take RDP of the VM now..??

3 Answers 3

2

The quickest way to do this is as follows.

1) Turn off the current VM (Call this VM1)

2) Spin Up a new VM (Call this VM2) and attach the OS disk from VM1 as a data disk. See this question for reference.

3) Boot VM2 and open registry

4) Load the registry hive from the attached OS disk of VM1. See this question for reference

5) Disable the firewall by looking for the following key EnableFirewall in HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\SharedAccess\Parameters\FirewallPolicy See this question for reference

6) Unload the registry hive.

7) Turn off VM2 and remove the attach disk

8) Boot VM1 access via RDP

1
  • You saved me man...Worked like a charm!!!!! i tried this approach but not able to get pass the step 4..cant find how to edit the registry..anyways thanks a ton...
    – too_cool
    Apr 13, 2016 at 20:05
2

This might help someone.

  1. Login to your Azure Dashboard
  2. Locate Resources and click on the VM
  3. Click on Run Command See Image here
  4. click on the first Command listed (Honestly clicking any other does not matter) Image here
  5. Type in Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False in the command box and click run Sample Image here
  6. Please note, the above command disables the firewall completely, it is totally your responsibility to re-nable it after you gain access to your server again
1
  • Easiest way

On Azure portal,

Run Command => SetRDPPort command

Set port as 3389 and clcik on 'Run'.

RDP Port 3389 enable

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .