Navigation:  Database > MS SQL Server > Manual Installation >

SQL Server Firewall Configuration

Previous pageReturn to chapter overviewNext page

*This help topic is taken from Microsoft Support link http://support.microsoft.com/kb/968872#LetMeFixItMyselfAlways

Windows Firewall on Windows Server 2008 helps prevent unauthorized access to computer resources. However, if the firewall is configured incorrectly, attempts to connect to an instance of SQL Server may be blocked. To access an instance of SQL Server that is behind the firewall, you must configure the firewall on the computer that is running SQL Server.

This topic helps you open the firewall ports for SQL Server on Windows Server 2008. The script that is discussed in this section opens the firewall ports for SQL Server.  Click here for the batch file or complete steps 1-4 to create the script manually.
 
To create the script, follow these steps:

1.Start Notepad.
2.Copy and paste the following code into Notepad:
 

@echo =========  SQL Server Ports  ===================

@echo Enabling SQLServer default instance port 1433

netsh firewall set portopening TCP 1433 "SQLServer"

@echo Enabling Dedicated Admin Connection port 1434

netsh firewall set portopening TCP 1434 "SQL Admin Connection"

@echo Enabling conventional SQL Server Service Broker port 4022

netsh firewall set portopening TCP 4022 "SQL Service Broker"

@echo Enabling Transact-SQL Debugger/RPC port 135

netsh firewall set portopening TCP 135 "SQL Debugger/RPC"

@echo =========  Analysis Services Ports  ==============

@echo Enabling SSAS Default Instance port 2383

netsh firewall set portopening TCP 2383 "Analysis Services"

@echo Enabling SQL Server Browser Service port 2382

netsh firewall set portopening TCP 2382 "SQL Browser"

@echo =========  Misc Applications  ==============

@echo Enabling HTTP port 80

netsh firewall set portopening TCP 80 "HTTP"

@echo Enabling SSL port 443

netsh firewall set portopening TCP 443 "SSL"

@echo Enabling port for SQL Server Browser Service's 'Browse' Button

netsh firewall set portopening UDP 1434 "SQL Browser"

@echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK)

netsh firewall set multicastbroadcastresponse ENABLE

3.Save the file as a .txt file by using the following name: OpenSqlServerPort.txt
4.Rename the OpenSqlServerPort.txt file to the following: OpenSqlServerPort.bat

 
 
Before you run the OpenSqlServerPort.bat script, you must copy the script to the computer which has the firewall and then run the script on that computer. To run the script, follow these steps:

1.Click Start, click Run, type cmd, and then click OK.
2.At the command prompt, use the cd command to navigate to the folder in which you saved the OpenSqlServerPort.bat file.
3.To run the OpenSqlServerPort.bat script, type OpenSqlServerPort.bat at the command prompt, and then press ENTER.

 

Check whether the problem is fixed by trying to access the instance of SQL Server from another computer.

 


Page url: http://www.amigopos.com/help/html/index.html?firewall_configuration.htm