Ssh – How to recover from bad firewall config in Azure

azurefirewallssh

All our virtual machines recently disappeared from Azure because our trial quotas were reached.

I decided to follow this guide for recovering the VMS: http://blogs.msdn.com/b/narahari/archive/2012/10/18/windows-azure-virtual-machine-disappeared-or-gone-how-do-i-recover.aspx

However, the virtual machines have firewall configurations created with ip-tables (via firewall builder). The new virtual machines get a new set of IPs. This causes problems, since ip-tables will try to reassign the old ip address to the interface. The end result is that we cannot SSH to the machines – they are inaccessible.

The question is how to recover from this. My current idea is to download the virtual machine images and try to mount them with some live-cd and remove the firewall configuration, then upload them again and create virtual machines based on that. However, I do not know how to mount the VHDs.

Is there any faster/better way?

Best Answer

I solved this by creating a new virtual machine on Azure, and attaching the old disk as a data disk. I then mounted the old disk and could remove the firewall script. We now have access to our VM's again, although we have had to update som DNS settings.

Related Topic