Firewall Rule for Sql Server 2005 on Windows 7

I have Sql Server 2005 installed on Windows 7 and have been trying to get a remote web application to connect to a database on my Windows 7 machine. I have been prevented from doing so while the firewall is on.

It was bit difficult to find the firewall rules and add the correct rule. The following process seems to work for me: (Information was found here under the “To access a program through the Windows Firewall” )

  1. Open the Control Panel
  2. Click “System and Security” if you are in “Category” view mode.
  3. Click “Windows Firewall”. (The green text)
  4. Click “Advanced settings” along the left hand side.
  5. Click “Inbound Rules” along the left hand side.
  6. Click “New Rule…”  to the right in the actions pane.
  7. Ensure “Program” is selected and click “Next >”
  8. Select “This program path:” radio button and click browse.
  9. You need to select the sqlservr.exe file which for my 2005 instance was located “C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn”
  10. Click “Open”
  11. Click “Next >”
  12. Click “Next >” again
  13. Click “Next >” again
  14. Give it a name of “Sql Server 2005” or another appropriate name. I would suggest giving the service name maybe. I Called it this “Sql Server: Sql2005“
  15. Click “Finish”

You may need to also add the Sql Browser service so that any named instances can be found.

  1. Click “New Rule…” again in the actions pane.
  2. Select “Port” and click “Next >”
  3. Select “UDP”
  4. Select “Specific local ports” and enter the port number 1434
  5. Click “Next >”
  6. Click “Next >” again
  7. Click “Next >” again
  8. Enter a name like : “Sql Server Browser”