How to Start or Stop Azure Firewall
Azure Firewall is a managed, cloud-based network security service that protects your Azure Virtual Network resources. It's a fully stateful firewall as a service with built-in high availability and unrestricted cloud scalability.
The pricing for the Azure Firewall is around $1.25 per deployment hour and $0.016 per GB processed.
So in a 24/7 availability deployment, it will cost you around $200. If the firewall only needs to be within office hours, this script can help you cut your expenses to almost half.
The Azure Firewall Operator lets you Turn your Azure Firewall On/Off on-demand. So you only pay for the hours of use.
It is capable of Deallocating and Reallocating multiple Public IPs of one Azure Firewall.
Runtime depends on how many Public IPs are allocated with the Firewall. But I have tested it on a Single Firewall with 86 Public IPs and the runtime is only around 15minutes.
To know more about the technicalities of the Script you may visit my Github repository at:
It is not the final form of the script. I might be able to optimise it more. But for now, I will share the current working version.
You may use this script as an Azure Runbook and run it on schedule. It only require the parameters indicated in the Documentation
How to Use Azure Runbook:
How to Start an Azure Runbook:
How to Schedule an Azure Runbook:
More about Azure Firewall:
Did this script help you?
Spare a dollar for a broke IT Professional.