I'm using node-mssql on Google App Engine to query a Sql Database hosted on Azure. The issue I'm having is that the App Engine Node Server constantly changes IP addresses. So, I'd have have to white list every possible (I don't know how many that is) IP Address on Azure. Is there another way around this?
Asked
Modified
8 years, 1 month ago
Viewed
159 times
Part
of Google Cloud and Microsoft Azure Collectives
1
-
From what I see in the docs, you can either turn off firewall filtering on Azure (not recommended) or switch from App Engine (or Azure) to something else since static IP mapping to an app is not possible in the App Engine (cloud.google.com/appengine/kb)Unglückspilz– Unglückspilz2017-10-21 22:48:31 +00:00Commented Oct 21, 2017 at 22:48
Add a comment
|
1 Answer
You can programmatically change the IP address whitelist using PowerShell as described in this document. To add a new range of IP addresses, run
New-AzureRmSqlServerFirewallRule -ResourceGroupName "myResourceGroup" `
-ServerName $servername `
-FirewallRuleName "AllowSome" -StartIpAddress "0.0.0.0" -EndIpAddress "0.0.0.0"
To remove a range of IP addresses, run
Remove-AzureRmSqlServerFirewallRule -ResourceGroupName "myResourceGroup" `
-ServerName $servername `
-FirewallRuleName "AllowSome" -StartIpAddress "0.0.0.0" -EndIpAddress "0.0.0.0"
You may need a Windows client to run Azure PowerShell though. See this document for a startup guide.
An alternative to use a virtual network within Azure and deploy your app on Azure.
2 Comments
mrshickadance
I'm not sure this solves the problem since I'd still have to constantly set the whitelisted IP address. The problem is that the IP address is always changing, and it's not a consistent range. So, any solution of setting IP whitelists isn't really viable, I'm pretty sure.
hokkaidi
If you wish to avoid IP whitelisting, please consider moving to Azure App and using VNET. azure.microsoft.com/en-us/blog/…