How to Create Rule on Firewall
The firewall running on the database server is blocking remote TCP/IP connections.
The easiest way to enable TCP/IP through port 1433 is to execute this line from Command Prompt. Check first the configured port as in the chapter above.
netsh advfirewall firewall add rule name=SQLPort dir=in protocol=tcp action=allow localport=1433 remoteip=localsubnet profile=DOMAIN
Alternative you can use this steps:
- On the Start menu, click Run, type WF.msc, and then click OK.
- In the Windows Firewall with Advanced Security, in the left pane, right-click Inbound Rules, and then click New Rule in the action pane (upper right corner).
- In the Rule Type dialog box, select Port, and then click Next.
- In the Protocol and Ports dialog box, select TCP. Select Specific local ports, and then type the port number of the instance of the Database Engine, In my case we are using the default which is 1433. Click Next.
- In the Action dialog box, select Allow the connection, and then click Next.
- In the Profile dialog box, I am going to Leave Domain turned on and turn private and public off. Then click Next.
- In the Name dialog box, type "Allow SQL 1433 Inbound" and for a description I am putting in the same. Then click Finish.