?
Solved

Can't connect SQL2008 when firewall sbs2011 is active

Posted on 2011-09-16
3
Medium Priority
?
2,089 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
setasoujiro earned 1000 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
Suggested Courses

762 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