You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/firewall/sql-fqdn-filtering.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Application rules with SQL FQDNs is currently available in all regions via the A
32
32
## Configure using Azure CLI
33
33
34
34
1. Deploy an [Azure Firewall using Azure CLI](deploy-cli.md).
35
-
2. If you filter traffic to Azure SQL Database, SQL Data Warehouse, or SQL Managed Instance, ensure the SQL connectivity mode is set to **Proxy**. To learn how to switch SQL connectivity mode, see [Azure SQL Connectivity Architecture](https://docs.microsoft.com/azure/sql-database/sql-database-connectivity-architecture#change-azure-sql-database-connection-policy).
35
+
2. If you filter traffic to Azure SQL Database, SQL Data Warehouse, or SQL Managed Instance, ensure the SQL connectivity mode is set to **Proxy**. To learn how to switch SQL connectivity mode, see [Azure SQL Connectivity Settings](https://docs.microsoft.com/azure/sql-database/sql-database-connectivity-settingse#change-azure-sql-database-connection-policy).
36
36
37
37
> [!NOTE]
38
38
> SQL *proxy* mode can result in more latency compared to *redirect*. If you want to continue using redirect mode, which is the default for clients connecting within Azure, you can filter access using the SQL [service tag](service-tags.md) in firewall [network rules](tutorial-firewall-deploy-portal.md#configure-a-network-rule).
@@ -54,7 +54,7 @@ Application rules with SQL FQDNs is currently available in all regions via the A
54
54
55
55
## Configure using the Azure portal
56
56
1. Deploy an [Azure Firewall using Azure CLI](deploy-cli.md).
57
-
2. If you filter traffic to Azure SQL Database, SQL Data Warehouse, or SQL Managed Instance, ensure the SQL connectivity mode is set to **Proxy**. To learn how to switch SQL connectivity mode, see [Azure SQL Connectivity Architecture](../sql-database/sql-database-connectivity-architecture.md#change-azure-sql-database-connection-policy).
57
+
2. If you filter traffic to Azure SQL Database, SQL Data Warehouse, or SQL Managed Instance, ensure the SQL connectivity mode is set to **Proxy**. To learn how to switch SQL connectivity mode, see [Azure SQL Connectivity Settings](https://docs.microsoft.com/azure/sql-database/sql-database-connectivity-settingse#change-azure-sql-database-connection-policy).
58
58
59
59
> [!NOTE]
60
60
> SQL *proxy* mode can result in more latency compared to *redirect*. If you want to continue using redirect mode, which is the default for clients connecting within Azure, you can filter access using the SQL [service tag](service-tags.md) in firewall [network rules](tutorial-firewall-deploy-portal.md#configure-a-network-rule).
Copy file name to clipboardExpand all lines: articles/sql-database/sql-database-connectivity-architecture.md
+14-78Lines changed: 14 additions & 78 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,16 @@ ms.topic: conceptual
11
11
author: rohitnayakmsft
12
12
ms.author: rohitna
13
13
ms.reviewer: carlrab, vanto
14
-
ms.date: 07/02/2019
14
+
ms.date: 03/09/2020
15
15
---
16
16
# Azure SQL Connectivity Architecture
17
+
> [!NOTE]
18
+
> This article applies to Azure SQL server, and to both SQL Database and SQL Data Warehouse databases that are created on the Azure SQL server. For simplicity, SQL Database is used when referring to both SQL Database and SQL Data Warehouse.
17
19
18
-
This article explains the Azure SQL Database and SQL Data Warehouse connectivity architecture as well as how the different components function to direct traffic to your instance of Azure SQL. These connectivity components function to direct network traffic to the Azure SQL Database or SQL Data Warehouse with clients connecting from within Azure and with clients connecting from outside of Azure. This article also provides script samples to change how connectivity occurs, and the considerations related to changing the default connectivity settings.
20
+
> [!IMPORTANT]
21
+
> This article does *not* apply to **Azure SQL Database Managed Instance**. Refer to [Connectivity architecture for a managed instance](sql-database-managed-instance-connectivity-architecture.md).
22
+
23
+
This article explains architecture of various components that direct network traffic to the Azure SQL Database or SQL Data Warehouse. It also explains different connection policies and how it impacts clients connecting from within Azure and clients connecting from outside of Azure.
19
24
20
25
## Connectivity architecture
21
26
@@ -33,13 +38,13 @@ The following steps describe how a connection is established to an Azure SQL dat
33
38
34
39
Azure SQL Database supports the following three options for the connection policy setting of a SQL Database server:
35
40
36
-
-**Redirect (recommended):** Clients establish connections directly to the node hosting the database, leading to reduced latency and improved throughput. For connections to use this mode clients need to
37
-
- Allow inbound and outbound communication from the client to all Azure IP addresses in the region on ports in the range of 11000 11999.
38
-
- Allow inbound and outbound communication from the client to Azure SQL Database gateway IP addresses on port 1433.
41
+
-**Redirect (recommended):** Clients establish connections directly to the node hosting the database, leading to reduced latency and improved throughput. For connections to use this mode, clients need to:
42
+
- Allow outbound communication from the client to all Azure IP addresses in the region on ports in the range of 11000 11999. Use the Service Tags for SQL to make this easier to manage.
43
+
- Allow outbound communication from the client to Azure SQL Database gateway IP addresses on port 1433.
39
44
40
-
-**Proxy:** In this mode, all connections are proxied via the Azure SQL Database gateways,leading to increased latency and reduced throughput. For connections to use this mode clients need to allow inbound and outbound communication from the client to Azure SQL Database gateway IP addresses on port 1433.
45
+
-**Proxy:** In this mode, all connections are proxied via the Azure SQL Database gateways,leading to increased latency and reduced throughput. For connections to use this mode, clients need to allow outbound communication from the client to Azure SQL Database gateway IP addresses on port 1433.
41
46
42
-
-**Default:** This is the connection policy in effect on all servers after creation unless you explicitly alter the connection policy to either `Proxy` or `Redirect`. The default policy is`Redirect` for all client connections originating inside of Azure (e.g. from an Azure Virtual Machine) and `Proxy`for all client connections originating outside (e.g. connections from your local workstation).
47
+
-**Default:** This is the connection policy in effect on all servers after creation unless you explicitly alter the connection policy to either `Proxy` or `Redirect`. The default policy is`Redirect` for all client connections originating inside of Azure (for example, from an Azure Virtual Machine) and `Proxy`for all client connections originating outside (for example, connections from your local workstation).
43
48
44
49
We highly recommend the `Redirect` connection policy over the `Proxy` connection policy for the lowest latency and highest throughput.However, you will need to meet the additional requirements for allowing network traffic as outlined above. If the client is an Azure Virtual Machine you can accomplish this using Network Security Groups (NSG) with [service tags](../virtual-network/security-overview.md#service-tags). If the client is connecting from a workstation on-premises then you may need to work with your network admin to allow network traffic through your corporate firewall.
45
50
@@ -95,6 +100,8 @@ Details of how traffic shall be migrated to new Gateways in specific regions are
95
100
| Korea South | 52.231.200.86 |
96
101
| North Central US | 23.96.178.199, 23.98.55.75, 52.162.104.33 |
97
102
| North Europe | 40.113.93.91, 191.235.193.75, 52.138.224.1 |
103
+
| Norway East | 51.120.96.0 |
104
+
| Norway West | 51.120.216.0 |
98
105
| South Africa North | 102.133.152.0 |
99
106
| South Africa West | 102.133.24.0 |
100
107
| South Central US | 13.66.62.124, 23.98.162.75, 104.214.16.32 |
@@ -109,78 +116,7 @@ Details of how traffic shall be migrated to new Gateways in specific regions are
109
116
| West US 2 | 13.66.226.202 |
110
117
|||
111
118
112
-
## Change Azure SQL Database connection policy
113
-
114
-
To change the Azure SQL Database connection policy for an Azure SQL Database server, use the [conn-policy](https://docs.microsoft.com/cli/azure/sql/server/conn-policy) command.
115
-
116
-
- If your connection policy is set to `Proxy`, all network packets flow via the Azure SQL Database gateway. For this setting, you need to allow outbound to only the Azure SQL Database gateway IP. Using a setting of `Proxy` has more latency than a setting of `Redirect`.
117
-
- If your connection policy is setting `Redirect`, all network packets flow directly to the database cluster. For this setting, you need to allow outbound to multiple IPs.
118
-
119
-
## Script to change connection settings via PowerShell
> The PowerShell Azure Resource Manager module is still supported by Azure SQL Database, but all future development is for the Az.Sql module. For these cmdlets, see [AzureRM.Sql](https://docs.microsoft.com/powershell/module/AzureRM.Sql/). The arguments for the commands in the Az module and in the AzureRm modules are substantially identical. The following script requires the [Azure PowerShell module](/powershell/azure/install-az-ps).
124
-
125
-
The following PowerShell script shows how to change the connection policy.
## Script to change connection settings via Azure CLI
142
-
143
-
> [!IMPORTANT]
144
-
> This script requires the [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
145
-
146
-
### Azure CLI in a bash shell
147
-
148
-
> [!IMPORTANT]
149
-
> This script requires the [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
150
-
151
-
The following CLI script shows how to change the connection policy in a bash shell.
152
-
153
-
```azurecli-interactive
154
-
# Get SQL Server ID
155
-
sqlserverid=$(az sql server show -n sql-server-name -g sql-server-group --query 'id' -o tsv)
156
-
157
-
# Set URI
158
-
ids="$sqlserverid/connectionPolicies/Default"
159
-
160
-
# Get current connection policy
161
-
az resource show --ids $ids
162
-
163
-
# Update connection policy
164
-
az resource update --ids $ids --set properties.connectionType=Proxy
165
-
```
166
-
167
-
### Azure CLI from a Windows command prompt
168
-
169
-
> [!IMPORTANT]
170
-
> This script requires the [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
171
-
172
-
The following CLI script shows how to change the connection policy from a Windows command prompt (with Azure CLI installed).
173
-
174
-
```azurecli
175
-
# Get SQL Server ID and set URI
176
-
FOR /F "tokens=*" %g IN ('az sql server show --resource-group myResourceGroup-571418053 --name server-538465606 --query "id" -o tsv') do (SET sqlserverid=%g/connectionPolicies/Default)
177
-
178
-
# Get current connection policy
179
-
az resource show --ids %sqlserverid%
180
119
181
-
# Update connection policy
182
-
az resource update --ids %sqlserverid% --set properties.connectionType=Proxy
0 commit comments