This Azure article will discuss how to whitelist your Azure functions’ IP address to secure it.
Table of Contents
Azure Function Whitelist IP Address
In real-time, we will meet with the scenario where, In order to Secure your Azure Function App, you need to allow some specific set range of IP addresses that your Organisation authorizes and restrict all other IP addresses that are unauthorized as per your organization. This is called whitelisting.
In order to whitelist IP address for the Azure function, Follow the below steps
Log in to the Azure Portal (https://portal.azure.com/)
Once you log in to the Azure Portal, Navigate to the Azure Function App

On the Azure Function App page, click on the Networking option from the left side navigation and then click on the Configure Access restrictions under the Access Restrictions options

On the Access Restrictions page, Click the + Add rule button to add a new rule for this Azure Function App.

Now, on the Add Access Restriction page, Provide the details below
- Name: Provide the name Add Access Restriction rule.
- Action: Choose the Action based on your business need. You can choose the Allow or Deny option.
- Priority: You need to provide the value as a number to set the Priority.
- Description: This is optional. If you want, you can put a description of the rule.
- Type: You can choose the Type IPV4.
- IP Address Block: We must provide the IP address value we want to allow or deny for this option.
Finally, click on the Add Rule button to add the rule

You can able to see the New rule has been added successfully. The deny-all rule will be added automatically.

Now, You can update the rule by clicking on the rule and modifying the value. Finally, click on the Update Rule button to save the changes. Now, I have updated the action value from Allow to Deny.

Now, when I am trying to access the Azure Function App from the IP mentioned above, You can see below it is not allowing me to access the Azure Function and is showing me Error 403 – Forbidden.

This is how you can now secure your Azure Functions app by using the whitelisting IP address method.
Azure Function Whitelist IP Address – Video Tutorial
Conclusion
This is all about Azure Function Whitelist IP Address method. Now, it is your turn to secure your Azure Function by Whitelisting the IP address using the information mentioned in this article. Thanks for reading this article !!!

I am Rajkishore, and I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machine, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.