如何配置Azure功能以连接到NSG背后的VM

时间:2019-04-16 10:22:03

标签: azure-functions azure-virtual-network azure-nsg

我在VM上托管了一个数据库,并在VM周围设置了NSG。不需要,我不需要azure函数来访问VM。

我将如何配置NSG以允许Azure Functions访问VM

1 个答案:

答案 0 :(得分:1)

As @DixitArora-MSFT's comment mentioned, you could whitelist the function App outbound IP address. Since some actions may change the IP address such as changing your App Service plan pricing tier, you need to whitelist a set of possibleOutboundIpAddresses. Another option is to whitelist the function apps' data center (Azure region). You can download a JSON file that lists IP addresses for all Azure data centers.

If you want to whitelist only with a known IP address, seems that the only way is to use a third-party proxy service or a different fundamental technology. Refer to this.

Furthermore, since your DB is hosted on Azure VM, I think you also could consider integrating a function app with an Azure virtual network for securely accessing the VM in a private network.