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 Configuring the Windows Firewall to Allow SQL Server Access, and Connecting to SQL Server over the Internet. There are many firewall systems available. For information specific to your system, see the firewall documentation.
The principal steps to allow access are:
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.
The following procedures configure the Windows Firewall by using the Windows Firewall item in Control Panel which only configures the firewall for the current network location profile. The Windows Firewall can also be configured using the Windows Firewall with Advanced Security Microsoft Management Console (MMC) snap-in and the netsh command line tool. For more information about these tools, see Configuring the Windows Firewall to Allow SQL Server Access.
In Control Panel, open Network Connections, right-click the active connection, and then click Properties.
Click the Advanced tab, and then click Windows Firewall Settings.
In the Windows Firewall dialog box, click the Exceptions tab, and then click Add Port.
In the Add a Port dialog box, in the Name text box, type SQL Server <instance name>.
In the Port number text box, type the port number of the instance of the Database Engine, such as 1433 for the default instance.
Verify that TCP is selected, and then click OK.
To open the port to expose the SQL Server Browser service, click Add Port, type SQL Server Browser in the Name text box, type 1434 in the Port Number text box, select UDP, and then click OK.
Close the Windows Firewall and the Properties dialog boxes.
In the Windows Firewall dialog box, on the Exceptions tab, click Add Program.
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 Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn\Sqlservr.exe.
To close the Windows firewall program, click OK twice.
For a brief tutorial about how to configure a static port, open the firewall, and connect to the Database Engine by using SQL Server Management Studio, see Tutorial: Getting Started with the Database Engine.