SQL Server firewall warning

Posted on 1/14/2013 @ 5:53 PM in #Vanilla .NET by | Feedback | 1566 views

When you run SQL server installation, it may give you a warning on firewall settings. Obviously you have to put some thought into what ports you open etc. But if you’re in a rush, and you’re doing this on a development environment, just run the below script and life will be good. You will still see the warning, but stuff will work.

   1:  netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80
   2:  netsh advfirewall firewall add rule name="SQL Server" dir=in action=allow protocol=TCP localport=1433
   3:  netsh advfirewall firewall add rule name="SQL Admin Connection" dir=in action=allow protocol=TCP localport=1434
   4:  netsh advfirewall firewall add rule name="SQL Service Broker" dir=in action=allow protocol=TCP localport=4022
   5:  netsh advfirewall firewall add rule name="SQL Debugger/RPC" dir=in action=allow protocol=TCP localport=135
   6:  netsh advfirewall firewall add rule name="Analysis Services" dir=in action=allow protocol=TCP localport=2383
   7:  netsh advfirewall firewall add rule name="SQL Browser" dir=in action=allow protocol=TCP localport=2382
   8:   
   9:  netsh advfirewall firewall add rule name="HTTP" dir=in action=allow protocol=TCP localport=80
  10:  netsh advfirewall firewall add rule name="SSL" dir=in action=allow protocol=TCP localport=443
  11:  netsh advfirewall firewall add rule name="SQL Browser" dir=in action=allow protocol=UDP localport=1434
  12:  netsh firewall set multicastbroadcastresponse ENABLE

Sound off but keep it civil:

Older comments..