# Configure Windows Firewall for Database Engine Access

- Link: https://sharepointtechnicalsupport.com/2016/11/17/configure-a-windows-firewall-for-database-engine-access/
- Published: 2016-11-17T17:48:08+05:30
- Author: Deviprasad Panda

### Configure Windows Firewall for Database Engine Access

This topic describes how to configure a Windows firewall for Database Engine access
in SQL Server 2016 by using SQL Server Configuration Manager. Firewall systems help
prevent unauthorized access to computer resources. To access an instance of the 
SQL Server Database Engine through a firewall, you must configure the firewall on
the computer running SQL Server to allow access.

For more information about the default Windows firewall settings, and a description
of the TCP ports that affect the Database Engine, Analysis Services, Reporting Services,
and Integration Services, see [Configure the Windows Firewall to Allow SQL Server Access](https://technet.microsoft.com/en-us/library/cc646023.aspx).
There are many firewall systems available. For information specific to your system,
see the firewall documentation.

The principal steps to allow access are:

 1. Configure the Database Engine to use a specific TCP/IP port. The default instance
    of the Database Engine uses port 1433, but that can be changed. The port used by
    the Database Engine is listed in the SQL Server error log. Instances of SQL Server
    Express, SQL Server Compact, and named instances of the Database Engine use dynamic
    ports. To configure these instances to use a specific port, see [Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)](https://technet.microsoft.com/en-us/library/ms177440.aspx).
 2. Configure the firewall to allow access to that port for authorized users or computers.**
    Note**
     The SQL Server Browser service lets users connect to instances of the Database
    Engine that are not listening on port 1433, without knowing the port number. To
    use SQL Server Browser, you must open UDP port 1434. To promote the most secure
    environment, leave the SQL Server Browser service stopped, and configure clients
    to connect using the port number.**Note** By default, Microsoft Windows enables
    the Windows Firewall, which closes port 1433 to prevent Internet computers from
    connecting to a default instance of SQL Server 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.

As an alternative to configuring SQL Server to listen on a fixed port and opening
the port, you can list the SQL Server 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 SQL Server can be accessed in this way.

In This Topic

 * Before you begin:[Security](https://technet.microsoft.com/en-us/library/ms175043.aspx#Security)
 * To configure a Widows Firewall for Database Engine access, using:[SQL Server Configuration Manager](https://technet.microsoft.com/en-us/library/ms175043.aspx#SSMSProcedure)

Before You Begin

### Security 

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](https://technet.microsoft.com/en-us/library/ms144228.aspx)

**Using SQL Server Configuration Manager**

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](https://technet.microsoft.com/en-us/library/cc646023.aspx)

#### To open a port in the Windows firewall for TCP access

 1. On the Start menu, click **Run**, type **WF.msc**, and then click **OK**.
 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.
 3. In the **Rule Type** dialog box, select **Port**, and then click **Next**.
 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 Database Engine, such
    as **1433** for the default instance. Click **Next**.
 5. In the **Action** dialog box, select **Allow the connection**, and then click **
    Next**.
 6. In the **Profile dialog box**, select any profiles that describe the computer connection
    environment when you want to connect to the Database Engine, and then click **Next**.
 7. In the **Name** dialog box, type a name and description for this rule, and then
    click **Finish**.

#### To open access to SQL Server when using dynamic ports

 1. On the Start menu, click **Run**, type **WF.msc**, and then click **OK**.
 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.
 3. In the **Rule Type** dialog box, select **Program**, and then click **Next**.
 4. In the **Program** dialog box, select **This program path**. Click **Browse**, 
    and navigate to the instance of SQL Server that you want to access through the 
    firewall, and then click **Open**. By default, SQL Server is at **C:Program FilesMicrosoft
    SQL ServerMSSQL13.MSSQLSERVERMSSQLBinnSqlservr.exe**. Click **Next**.
 5. In the **Action** dialog box, select **Allow the connection**, and then click **
    Next**.
 6. In the **Profile** dialog box, select any profiles that describe the computer connection
    environment when you want to connect to the Database Engine, and then click **Next**.
 7. In the **Name** dialog box, type a name and description for this rule, and then
    click **Finish**.

See Also
 [How to: Configure Firewall Settings (Azure SQL Database)](https://azure.microsoft.com/documentation/articles/sql-database-configure-firewall-settings/)

### Share this:

 * [  X ](https://sharepointtechnicalsupport.com/2016/11/17/configure-a-windows-firewall-for-database-engine-access/?share=twitter)
 * [  Facebook ](https://sharepointtechnicalsupport.com/2016/11/17/configure-a-windows-firewall-for-database-engine-access/?share=facebook)
 * [  WhatsApp ](https://sharepointtechnicalsupport.com/2016/11/17/configure-a-windows-firewall-for-database-engine-access/?share=jetpack-whatsapp)
 * [  Email ](https://sharepointtechnicalsupport.com/2016/11/17/configure-a-windows-firewall-for-database-engine-access/?subject=%5BShared%20Post%5D%20Configure%20Windows%20Firewall%20for%20Database%20Engine%20Access&body=https%3A%2F%2Fsharepointtechnicalsupport.com%2F2016%2F11%2F17%2Fconfigure-a-windows-firewall-for-database-engine-access%2F&share=email)
 * [  Telegram ](https://sharepointtechnicalsupport.com/2016/11/17/configure-a-windows-firewall-for-database-engine-access/?share=telegram)
 * [  LinkedIn ](https://sharepointtechnicalsupport.com/2016/11/17/configure-a-windows-firewall-for-database-engine-access/?share=linkedin)
 * [  Tumblr ](https://sharepointtechnicalsupport.com/2016/11/17/configure-a-windows-firewall-for-database-engine-access/?share=tumblr)
 * [  Pinterest ](https://sharepointtechnicalsupport.com/2016/11/17/configure-a-windows-firewall-for-database-engine-access/?share=pinterest)

### Like this:

Like Loading…

### _Related_
