• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2104
  • Last Modified:

Can't connect SQL2008 when firewall sbs2011 is active

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
sitpro
Asked:
sitpro
1 Solution
 
Haris DjulicCommented:
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
 
sitproAuthor Commented:
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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now