Accessing IP restricted URI from Azure function (p

2019-07-16 04:53发布

问题:

I'd like to know given a Powershell function such as:

$url = "http://AnIPrestrictedURL"
[xml]$xml = (new-object System.Net.WebClient).DownloadString($url)

with $url being an IP restricted url what are my options (if any) to be able to make this work? Is VPN an option or some other method? Would Express route (obv cost not being a factor) or point to site VPN work for this??

EDIT: To make this clearer? I have control of the IPRestrictedUrl server so in theory I could allow access to this via VPN / express route presumably without the IP restriction?? this is the point of the question?

Perhaps I should have said "how can I use an Azure Function with a service I do not want to be publicly accessible" If it matters the end service is SOLR

回答1:

While the list of Outbound IPs is provided for Azure Web App (and is stable), the equivalent does not exist for Azure Function Apps. The reason is that they get scaled out very dynamically, and can end up running across many scale units, each with a different set of Outbound IPs.

So generally, you cannot make assumptions on Outbound IPs when using Azure Functions.