Firewall – SQL Server 2008 Remote Access

firewallsql-server-2008windows-server-2008

I'm having problems connecting to my SQL Server 2008 database from my computer. I have enabled remote connections as described in this answer (How to enable remote connections for SQL Server 2008?). And I have added the ports listed on the microsoft support page to our Cisco Asa firewall and I'm still unable to connect.

The error I'm getting from the SQL Management Studio is:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 – A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)

Once again, I have double and triple checked that remote connections are enabled under the database properties and that TCP is enabled on the configuration page. I've added tcp ports 135, 1433, 1434, 2382, 2383, and 4022 as well as udp 1434 to the firewall. I've also checked to make sure that 1433 is the static port that is set in the tcp section of the database server configuration. The ports should be configured correctly in the firewall since http/https and rdp are all working and the sql server ports are setup the same way.

What am I missing here? Any help you could offer would be greatly appreciated.

Edit: I can connect to the server via TCP on the internal network. The servers are colocated in a datacenter and I can connect from my production box to my development box and vice versa. To me that indicates a firewall issue, but I've no idea what else to open. I've even tried allowing all tcp ports to that server without success.

Best Answer

Check with your CoLo provider, they may be blocking access to port 1433. Many CoLos started doing this after the SQL Slammer went around a while back.

It's also recommended that you not try and access SQL Server's directly over the internet. Instead setup a VPN between the CoLo and your office and access the servers over this secure connection instead of over the public internet.