How to Enable Firewall Incoming Database Connections

The firewall running on the database server may block the incoming remote TCP/IP connections. For Windows servers, the easiest way to enable TCP/IP for port 1433 is using the command below from the Command Prompt. The standard SqlServer port value is 1433.
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:
  1. On the Windows Start search for 'Windows Firewall'.

    Setup Windows Firewall for database connectivity
  2. 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).

    Firewall 2
  3. In the Rule Type dialog box, select Port, and then click Next.
  4. In the Protocol and Ports dialog box, select TCP. Select Specific local ports, and then type the database port number. The default value is 1433. Click Next.
  5. In the Action dialog box, select 'Allow the connection', and then click Next.
  6. In the Profile dialog box, I am going to Leave Domain turned on and turn private and public off. Click Next.
  7. In the Name dialog box, type "Allow SQL 1433 Inbound” and for a description I am using the same. Click Finish.
For linux servers please look in google.