Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I allow unknown users to access my SQL (Azure) DB?

Apparently one must explicitly specify (whitelist) the IP addresses that will be allowed access to a SQL Azure DB. I want, though, to have N-gazillion* users that will access these tables for data specific to them.

  • delusions of grandeur/megalomania

Will these need to first provide me with their IP address so that I can add it as a valid entry, or is there a programmatic way to do it, or some other workaround?

like image 973
B. Clay Shannon-B. Crow Raven Avatar asked Nov 15 '12 21:11

B. Clay Shannon-B. Crow Raven


People also ask

How do I allow all IP to access Azure SQL?

Sign in to the portal. Go to the Configure tab on the server that hosts your database. The Current Client IP Address is displayed in the Allowed IP Addresses section. Select Add for Allowed IP Addresses to allow this computer to access the server.

How do I make my Azure database public?

Login to azure Portal select your database subscription click on Tools Now there is option 'Open in VisualStudio' (click on it) You can see "Configure Firewall" click on it. Add you new IP. Done :) Show activity on this post.


2 Answers

It would be advisable to have some sort of middle ware access the db and not your clients directly.

However if you want any IP to be able to connect to the db just add this entry to the firewall list:

Azure Portal -> Databases -> Servers -> Configure and add the following rule:

enter image description here

like image 168
cillierscharl Avatar answered Sep 28 '22 09:09

cillierscharl


How will your users be accessing the DB, via a Web App (front end) or directly (I assume you won't give users direct access to your DB?), if its via a Web App (presentation layer) then all you need todo is grant access to this IP address of the presentation layer/service layer (and if hosted in Azure its beside it).

SQL DB Azure has two types of access restrictions (more info here) "Windows Azure SQL Database Firewall"

  • Server-level firewall rules:
  • Database-level firewall rules

You could either open up all IP address 0.0.0.0 - 255.255.255.255 (not very secure) or come up with more finer grained policies based on the above Database firewall rules.

like image 30
user728584 Avatar answered Sep 28 '22 08:09

user728584