Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure Azure SQL Database Firewall for just my Web App

We use Azure Web Apps with Azure SQL and would like to make this setup more secure by configuring the database firewall to only allow connection from the specific web apps rather than any service in Azure. How can I limit connections to just my Azure services?

like image 641
Cameron Taggart Avatar asked Mar 25 '15 21:03

Cameron Taggart


People also ask

How do I configure my Azure SQL Database firewall?

By default, access through the Azure SQL Database firewall is disabled for all Azure services. Choose ON on this page to enable access for all Azure services. Select Save. Port 1433 is now open on the server and a server-level IP-based, firewall rule is created for your current IP address.


2 Answers

Assuming that you have an ip address (hosting plan needs to be shared, basic or standard)**:

a) Navigate to SQL Databases >> Servers Tab >> Select the server hosting your database >> Configure Tab

b) Alternatively select your database >> Manage Allowed Ip Address (Right side Quick Glance bar)

  • Add your website ip to the list of allowed ip addresses
  • Change Windows Azure Services to "No" on "Allowed Services"

**You can view your ip address clicking Manage Domains on the Website Dashboard bottom bar.

like image 89
Bruno Faria Avatar answered Oct 18 '22 00:10

Bruno Faria


There are 4 outbound IP addresses for a Web App which you can look up on the Properties tab for the Web App in the management portal.

You need to add these outbound IP addresses to the Firewall rules.

like image 36
bgx Avatar answered Oct 18 '22 00:10

bgx