1
votes

I've created a network with the following rules: enter image description here

I have two virtual machines, both running Windows Server 2012. Computer 1 (192.168.0.2) Computer 2 (192.168.0.3)

I can ping between the machines without any problems.

On Computer 1 I have SQL Server 2014 Express installed. These are the firewall rules added to the server: enter image description here

I am unable to connect to the SQL Server instance from Computer 2. If I disable the firewall it works.

The rules added to the server work ok in Azure and on my Hyper V virtual machines. Do I need to add an other rules for it to work in Google Compute?

I only want to be able to access this SQL instance through machines on the same network.

1
you need to add port numbers in firewall to allow incoming connections - TheGameiswar
in google network or in the virtual machine? - Boomerang
there are rules for UDP:1434 and TCP:1433, if its another rule? - Boomerang

1 Answers

0
votes

There seems to be an issue with the way the windows firewall as been configured based on the fact that you can connect when the firewall is disabled. A couple of things to try out, to see if they resolve the issue for you.

  1. Put 1-65535 in their allow internal firewall rule, not 0-65535
  2. Add client internal IP to the firewall rule

For example:

netsh advfirewall firewall add rule name="SQL Access" dir=in action=allow program="%programfiles%\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" remoteip=localsubnet,x.y.z.w

where x.y.z.w should be replaced by your client internal IP, and the program path should match your installation path to sqlservr.exe. It varies based on the version of SQL Server you have installed.

Let us know if you still face this issue and we can take another look.