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. Now let’s discuss how to whitelist IP address in Azure Portal.

To whitelist Azure Function App IP address, Follow the below steps

  1. Log in to the Azure Portal (https://portal.azure.com/)
  2. Once you log in to the Azure Portal, Navigate to the Azure Function App
Azure Function Whitelist IP Address

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

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

5. 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 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 how to whitelist IP in Azure Portal. 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 !!!