Azure Site-To-Site connectivity and SQL IaaS - azure

If I create a VNet named mySiteToSitevNet and configure it for Site-To-Site connectivity. I create a Virtual Machine assign it to use mySiteToSiteVNet as its network. I Install SQL Server on it.
Do i get Public IP to connect to that SQL Server from my WebApp which does not have VNet associated to it?
If not, how do I make my WebApp connect to that SQL Server and use the database?

There are 2 options:
Since you already have a Sign to Site VPN then you can VPN in from your website's box to enable it to access the SQL and that's the most secure way.
If for some reason you don’t want to VPN in, first you need to figure out why you don’t want to do this. If there’s a really good reason to not VPN in, then continue with setting up direct Internet access to the SQL Server.
To open an endpoint browse to the VM in the Azure portal. Open the properties of the VM in the Azure Portal, then click the “All Settings” option. Then select “Endpoints”. It’ll look something like this.
If you see a “SQL Server” endpoint with 0 ACL Rules then the work is half done (shown above). If there are ACL rules then you should be finished unless you need to add more ACL Rules.
If there is no SQL Server endpoint click the “Add” button at the top of the Endpoints blade. Name the endpoint “SQL Server”, select the protocol TCP, then set the ports to 1433 (or whatever TCP ports you want to use, but 1433 is the default). Select to setup access rules for whoever needs access and block any subnets that don’t need access and then OK back to the VM’s properties.
At this point you can connect to the SQL Server instance through whichever method you’ve setup. If you are using either VPN option you can just connect to the Virtual Machine’s network name. If you are going through the public endpoint (again this is REALLY NOT recommended) you’ll need to connect to the machines full DNS name.

Any VM deployed in a Virtual network can also be exposed through public Internet, so the answer to your question is Yes, it can be given a instance lvel public IP address (https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-instance-level-public-ip/) or port behind the public load balancer (https://azure.microsoft.com/en-us/documentation/services/load-balancer/)

Related

Access Azure Private Endpoint Using Azure VPN

I am trying to access resources that are secured behind private endpoint from a remote location using an Azure VPN Point-to-Site connection.
So far I have setup a conditional forwarder to send DNS requests to Azure's internal DNS IP address (168.63.129.16). With my setup I can resolve all my private endpoints using nslookup to their private IP addresses. I can also connect to services such as SQL server from my local machine (using SQL Server Management Studio in the case of SQL server).
The problem I am facing is that I can only access resources if I use a desktop client for a given service. If I try to do anything using the Azure Portal, I get an error stating that I cannot access resources using my Public IP address without adding it as an inbound IP address. Whilst this is certainly an option, I don't want to go down this road.
I am hoping there is an option where I can connect to private endpoint resources from Azure Portal whilst connected to my point-to-site VPN. Any ideas?
So far I have setup a conditional forwarder to send DNS requests toAzure's internal DNS IP address (168.63.129.16). With my setup I can resolve all my private endpoints using nslookup to their private IP addresses. I can also connect to services such as SQL server from my local machine (using SQL Server Management Studio in the case of SQL server.
AfAIK, the process which you are doing is correct, To fix this issue try to update the local host file on client desktop to deploy a recourse with private endpoint please refer this link for more in detail
By default when you create a Private Endpoint in the Azure Portal it will automatically lock out public access. Service Endpoints operate by adding routes to allow traffic out of the virtual network to reach the public endpoint of the service selected. If you are access resources error, update firewall rules to communicate with your Azure resources you really need to configure v-net traffic on the firewall settings
Next option is conditional forwarder, in your scenario the ble from every v-net, its public ip it won't overlap with any private ips, it available from inside of azure v-net unique to each
In conditional for forwarder, client asks the ip of a host like www.seraltos.com .The dns server looks to see the answer if knows, if not a lookup will done based on root servers or forwarder to find the ip address returns that to the client
For more information in detail, please refer below links:
Private Endpoints and DNS in Azure & Cannot access my own public IP
https://learn.microsoft.com/en-us/azure/storage/common/storage-private-endpoints
https://learn.microsoft.com/en-us/azure/private-link/manage-private-endpoint?tabs=manage-private-link-powershell

How to connect to Azure pass DB from a secure network

I would like to connect to Azure SQL server from a Window server via SSMS. In the “set server firewall” from Azure, I have given my server IP ( from the system I would like to connect). I need to know the destination IP adders of the Azure DB Server. From Azure portal the location is showing central US . To allow firewall I need to know the destination IP address.
My questions are:
1. As Central US could have multiple IP addresses, do I need to provide all IPs to my Firewall team?
2. How can I know the destination IP address ( i.e. Azure) so that I can provide that to my firewall team?
Note: From SQL server management studio, the tcp default port for SQL is enabled and services are running fine.
Hope I have explained it correctly.Thanks
No. You cannot get a static IP address assignment for your Azure SQL Database. Moreover, what you refer (mysqlserverdatabase.mysql.database.azure.com designates your Azure SQL Database Server, not a single Database. This is a logical server, in which you can put up to 149 Databases (150 with the Master DB).
You have to workaround your requirement for static IP address assingment to work with the DNS Name (mysqlserverdatabase.mysql.database.azure.com).
Otherwise if your company firewall can't work with the DNS Name ,you need to set the server connection policy to Proxy as documented in Azure SQL Connectivity Architecture. This allows the database gateway to proxy all traffic between the client and the DB server. The gateways all have static IP addresses, which are listed in the above document.
If you have setup a VNet in Azure, checkout VNet Service Endpoints to connect Azure SQL.
https://azure.microsoft.com/en-in/blog/vnet-service-endpoints-for-azure-sql-database-now-generally-available/

Provision SQL Always on in Azure VMs with external access

We are setting up SQL Always On in Azure VM (IAAS). We followed the steps given in Configure Always On Availability Group in Azure VM manually and the setup is working fine. Since the setup is using the internal load balancer, the listener is available only internally i.e. using a jump box. We are using NSGs to restrict access to the servers from our office IPs and allow access to the SQL Servers from developer machines. This works for direct access to the individual SQL server but not via listener. What can be done to allow access from outside of the VNET?
This subscription is standalone and not connected to the on-premise via site-to-site VPN or Express Route. The resources should be accessed using internet and source IPs are specifically white listed (it is a very small fixed list).
You can configure a Point-to-Site connection to allow your clients to connect the Azure VNet then use sql server.
Yes, the solution to which is to use a Point-to-Site with a VPN gateway deployed.
But, keep in mind that you can have a max of 128 users.
Apart from which, P2S should do the trick here.

SQL Azure 0.0.0.0 firewall rule

Is setting firewall rule for SQL Azure server on specific IP address (or range) is favored on setting the 0.0.0.0 firewall “Allow Microsoft Services access to this server” rule in term of security ?
As far as I know 0.0.0.0 allow all access from Azure local IPs (but of course to actually connect to the database the specific server name and login username/password will need to be offered).
Using 0.0.0.0 makes the configuration more easy since there is no need to track the role instances IPs in order to enable SQL Azure server connections but it does open some risks.
I would like to hear you opinion.
Thanks!
The 0.0.0.0 setting is used internally by Microsoft to allow their services to connect to your SQL instance. Of course, in theory your SQL database is open to any Windows Azure machine out there but it's not like the potential connection surface is the entire world.
Firstly,
Allowed Windows Azure Services - Will allow only azure services to access the database.
Secondly,
To be able to access the database server from any other endpoint, you need to add firewall rules to allow those specific IP ranges. If you want to connect from a machine with ip, 132.99.xx.xx you need to add a rule with start IP and end IP as 132.99.xx.xx
It is always a good practice to add the ranges which are necessary, to avoid any chances of attack
Hope this helps!

How can I convey this to CorpIT?

My Azure web role can, using remote desktop, connect with a browser (IE) to google.com and to a DMZ server on our corporate network.
My web role cannot connect via HTTP GET (IE) to a non-DMZ box behind the firewall. My web role cannot ping this box either. My service is hosted in north/central, allegedly all published IP ranges of north/central have been granted access to the target IP by our CorpIT people. They claim they are seeing no traffic via their sniffer from my compute instance IP when I attempt to ping or HTTP GET against the target local IP.
CorpIT wants help from the Microsoft side but we have no Microsoft relationship. I'm convinced this is the outcome of months of slapdash thirdhand firewall rules applied to the target environment in question. What can I do to further elucidate this for CorpIT?
thx in advance!
You can try to run a trace route or get a network trace from the Azure instance and see what you get back from where. You could also create a support case with microsoft:
https://support.microsoft.com/oas/default.aspx?&c1=501&gprid=14928&&st=1&wfxredirect=1&sd=gn
I wouldn't bet on using the IP ranges to make your applications work correctly. Windows Azure already provides you with some services that allow you to solve these types of issues:
Windows Azure Connect: Allows you to create an IPSec secured connection between your servers and your hosted services. This means you won't need to add rules to the firewall for incoming traffic.
Windows Azure Service Bus Relay: Allows you to expose WCF services to the cloud without having to add rules to the firewall for incoming traffic. Choosing this option might add some extra work for you to do, you might need to create a WCF service if you don't already have one and change the code in your Web Role to connect to this WCF Service.

Resources