|
1 | 1 | --- |
2 | | -title: "Configure a Windows Firewall for Database Engine Access | Microsoft Docs" |
| 2 | +title: "Configure a Windows Firewall for Database Engine Access" |
3 | 3 | description: Find out how to configure a Windows firewall so that client computers can access an instance of the SQL Server Database Engine through the firewall. |
4 | 4 | ms.custom: "" |
5 | | -ms.date: "03/14/2017" |
| 5 | +ms.date: "12/16/2021" |
6 | 6 | ms.prod: sql |
7 | 7 | ms.prod_service: high-availability |
8 | 8 | ms.reviewer: "" |
@@ -36,59 +36,48 @@ ms.author: maghan |
36 | 36 | > [!NOTE] |
37 | 37 | > By default, [!INCLUDE[msCoName](../../includes/msconame-md.md)] Windows enables the Windows Firewall, which closes port 1433 to prevent Internet computers from connecting to a default instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] on your computer. Connections to the default instance using TCP/IP are not possible unless you reopen port 1433. The basic steps to configure the Windows firewall are provided in the following procedures. For more information, see the Windows documentation. |
38 | 38 | |
39 | | - As an alternative to configuring [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to listen on a fixed port and opening the port, you can list the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] executable (Sqlservr.exe) as an exception to the blocked programs. Use this method when you want to continue to use dynamic ports. Only one instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] can be accessed in this way. |
| 39 | + As an alternative to configuring [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to listen on a fixed port and opening the port, you can list the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] executable (Sqlservr.exe) as an exception to the blocked programs. Use this method when you want to continue to use dynamic ports. Only one instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] can be accessed in this way. |
40 | 40 |
|
41 | | - **In This Topic** |
42 | | - |
43 | | -- **Before you begin:** |
44 | | - |
45 | | - [Security](#Security) |
46 | | - |
47 | | -- **To configure a Windows Firewall for Database Engine access, using:** |
48 | | - |
49 | | - [SQL Server Configuration Manager](#SSMSProcedure) |
50 | | - |
51 | | -## Before You Begin |
| 41 | +## Before you begin |
52 | 42 |
|
53 | 43 | ### <a name="Security"></a> Security |
54 | 44 | Opening ports in your firewall can leave your server exposed to malicious attacks. Make sure that you understand firewall systems before you open ports. For more information, see [Security Considerations for a SQL Server Installation](../../sql-server/install/security-considerations-for-a-sql-server-installation.md) |
55 | 45 |
|
56 | | -## <a name="SSMSProcedure"></a> Using SQL Server Configuration Manager |
57 | | - Applies to Windows Vista, Windows 7, and Windows Server 2008 |
| 46 | +## <a name="SSMSProcedure"></a> Using SQL Server Configuration Manager |
58 | 47 |
|
59 | 48 | The following procedures configure the Windows Firewall by using the Windows Firewall with Advanced Security Microsoft Management Console (MMC) snap-in. The Windows Firewall with Advanced Security only configures the current profile. For more information about the Windows Firewall with Advanced Security, see [Configure the Windows Firewall to Allow SQL Server Access](../../sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access.md) |
60 | 49 |
|
61 | 50 | #### To open a port in the Windows firewall for TCP access |
62 | 51 |
|
63 | | -1. On the **Start** menu, click **Run**, type **WF.msc**, and then click **OK**. |
| 52 | +1. On the **Start** menu, select **Run**, type **WF.msc**, and then select **OK**. |
64 | 53 |
|
65 | | -2. In the **Windows Firewall with Advanced Security**, in the left pane, right-click **Inbound Rules**, and then click **New Rule** in the action pane. |
| 54 | +2. In the **Windows Firewall with Advanced Security**, in the left pane, right-click **Inbound Rules**, and then select **New Rule** in the action pane. |
66 | 55 |
|
67 | | -3. In the **Rule Type** dialog box, select **Port**, and then click **Next**. |
| 56 | +3. In the **Rule Type** dialog box, select **Port**, and then select **Next**. |
68 | 57 |
|
69 | | -4. In the **Protocol and Ports** dialog box, select **TCP**. Select **Specific local ports**, and then type the port number of the instance of the [!INCLUDE[ssDE](../../includes/ssde-md.md)], such as **1433** for the default instance. Click **Next**. |
| 58 | +4. In the **Protocol and Ports** dialog box, select **TCP**. Select **Specific local ports**, and then type the port number of the instance of the [!INCLUDE[ssDE](../../includes/ssde-md.md)], such as **1433** for the default instance. Select **Next**. |
70 | 59 |
|
71 | | -5. In the **Action** dialog box, select **Allow the connection**, and then click **Next**. |
| 60 | +5. In the **Action** dialog box, select **Allow the connection**, and then select **Next**. |
72 | 61 |
|
73 | | -6. In the **Profile** dialog box, select any profiles that describe the computer connection environment when you want to connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)], and then click **Next**. |
| 62 | +6. In the **Profile** dialog box, select any profiles that describe the computer connection environment when you want to connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)], and then select **Next**. |
74 | 63 |
|
75 | | -7. In the **Name** dialog box, type a name and description for this rule, and then click **Finish**. |
| 64 | +7. In the **Name** dialog box, type a name and description for this rule, and then select **Finish**. |
76 | 65 |
|
77 | 66 | #### To open access to SQL Server when using dynamic ports |
78 | 67 |
|
79 | | -1. On the **Start** menu, click **Run**, type **WF.msc**, and then click **OK**. |
| 68 | +1. On the **Start** menu, select **Run**, type **WF.msc**, and then select **OK**. |
80 | 69 |
|
81 | | -2. In the **Windows Firewall with Advanced Security**, in the left pane, right-click **Inbound Rules**, and then click **New Rule** in the action pane. |
| 70 | +2. In the **Windows Firewall with Advanced Security**, in the left pane, right-click **Inbound Rules**, and then select **New Rule** in the action pane. |
82 | 71 |
|
83 | | -3. In the **Rule Type** dialog box, select **Program**, and then click **Next**. |
| 72 | +3. In the **Rule Type** dialog box, select **Program**, and then select **Next**. |
84 | 73 |
|
85 | | -4. In the **Program** dialog box, select **This program path**. Click **Browse**, and navigate to the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] that you want to access through the firewall, and then click **Open**. By default, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is at **C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\Sqlservr.exe**. Click **Next**. |
| 74 | +4. In the **Program** dialog box, select **This program path**. Select **Browse**, and navigate to the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] that you want to access through the firewall, and then select **Open**. By default, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is at **C:\Program Files\Microsoft SQL Server\MSSQLXX.MSSQLSERVER\MSSQL\Binn\Sqlservr.exe**. Select **Next**. The `MSSQLXX` version will be specific to your version of SQL Server. |
86 | 75 |
|
87 | | -5. In the **Action** dialog box, select **Allow the connection**, and then click **Next**. |
| 76 | +5. In the **Action** dialog box, select **Allow the connection**, and then select **Next**. |
88 | 77 |
|
89 | | -6. In the **Profile** dialog box, select any profiles that describe the computer connection environment when you want to connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)], and then click **Next**. |
| 78 | +6. In the **Profile** dialog box, select any profiles that describe the computer connection environment when you want to connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)], and then select **Next**. |
90 | 79 |
|
91 | | -7. In the **Name** dialog box, type a name and description for this rule, and then click **Finish**. |
| 80 | +7. In the **Name** dialog box, type a name and description for this rule, and then select **Finish**. |
92 | 81 |
|
93 | 82 | ## See Also |
94 | 83 | [How to: Configure Firewall Settings (Azure SQL Database)](/azure/azure-sql/database/firewall-configure) |
|
0 commit comments