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
Active
Viewed 122 times
0
-
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 (https://cloud.google.com/appengine/kb/) – Unglückspilz Oct 21 '17 at 22:48
1 Answers
1
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.

hokkaidi
- 858
- 6
- 19
-
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. – mrshickadance Oct 24 '17 at 23:54
-
If you wish to avoid IP whitelisting, please consider moving to Azure App and using VNET. https://azure.microsoft.com/en-us/blog/azure-sql-database-vnet-service-endpoints-now-in-public-preview/ – hokkaidi Oct 26 '17 at 00:15