Azure Function Whitelist IP Address

This Azure article will discuss how to whitelist your Azure functions’ IP address to secure it.

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

Azure Function Whitelist IP Address

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

How to Whitelist IPs in Azure Functions

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

azure function app outbound ip address

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

Azure Function Whitelist IP Address

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

azure function app static ip

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.

azure function fixed ip

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.

azure app service whitelist ip

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 !!!