0

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?

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) Commented Oct 21, 2017 at 22:48

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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.
If you wish to avoid IP whitelisting, please consider moving to Azure App and using VNET. azure.microsoft.com/en-us/blog/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.