Azure – Lost RDP access to VM azure after firewall changes

azurerdpwindows-server-2012-r2

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..??

Best Answer

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

Related Topic