Solved

Can't connect SQL2008 when firewall sbs2011 is active

Posted on 2011-09-16
3
2,060 Views
Last Modified: 2012-05-12
I’m using  a Windows SBS2001 with SQL express 2008r2.

When a client tries to connect the SQL server it doesn’t work. The connection is probably blocked by the SBS2001 firewall. If I turn the firewall off, then the client can connect to the SQL database.

I tried many thing, but they didn’t help.

-      Allow incoming tcp port 1433 in the server firewall
-      In the SQL server configuration manager under “Protocols for SQL Express “
I configured the tcpip protocol: tcp port: 1433, dynamic port – (and also tried different combinations)

So basically, when I turn off the server 2011 firewall, I can connect to the SQL database. But I want to make it work when firewall’s active.


0
Comment
Question by:sitpro
3 Comments
 
LVL 14

Accepted Solution

by:
setasoujiro earned 500 total points
ID: 36552114
0
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 36552117
add  exception programs to server firewalls since the SQL server and Sql browser will sometimes use dynamic ports with this way you will cover all dynamic ports since you are allowing the program to pass throu the firewall.


From my experience you need to add the SQL server and Sql Server Browser

Take a look here

http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/

http://blog.sqlauthority.com/2008/08/09/sql-server-fix-error-1326-cannot-connect-to-database-server-error-40-could-not-open-a-connection-to-sql-server/ 
0
 

Author Closing Comment

by:sitpro
ID: 36554305
You have to add ALL below ports in the Windows firewall to make it work.

Type in the searchbox firewall and select Windows Firewall with advanced security. Go to Inbound Rules and add the ports one by one:

New Rule > TCP > Specific Local Ports > Next > Domain > Next > Finish

Use these TCP Port:
 135 – Transact SQL Debugger
 1433 – SQL Traffic
 2383 – SQL Analytics Traffic
 4022 – SQL Broker Traffic

Use these UDP Port:
1434 – SQL Browser Traffic
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
OfficeMate Freezes on login or does not load after login credentials are input.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question