1

I'm still trying to get a remote access to the MS SQL Server on one of my Windows machine.

I allowed the access on my Windows firewall as can be seen here and here. I also opened the port on CoMoDo FW as can be seen here.

But trying to access the machine from the Linux with busybox telnet 192.168.1.4 1433 does not produce "Connected".

The server itself does configured to accept the remote connections.

What other settings I'm missing?

Thank you.

[EDIT]

C:\Users\Igor>netsh firewall add allowedprogram program="C:\Program Files\Micros
oft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" name="Microsoft SQL
Server 2012 Database Engine Access" profile=domain,private
The syntax supplied for this command is not valid. Check help for the correct sy
ntax.

add allowedprogram
      [ program = ] path
      [ name = ] name
      [ [ mode = ] ENABLE|DISABLE
        [ scope = ] ALL|SUBNET|CUSTOM
        [ addresses = ] addresses
        [ profile = ] CURRENT|DOMAIN|STANDARD|ALL ]

  Adds firewall allowed program configuration.

  Parameters:

  program - Program path and file name.

  name - Program name.

  mode - Program mode (optional).
      ENABLE  - Allow through firewall (default).
      DISABLE - Do not allow through firewall.

  scope - Program scope (optional).
      ALL    - Allow all traffic through firewall (default).
      SUBNET - Allow only local network (subnet) traffic through firewall.
      CUSTOM - Allow only specified traffic through firewall.

  addresses - Custom scope addresses (optional).
              This comma-separated scope can contain IPv4 addresses,
              IPv6 addresses, subnets, ranges, or the keyword LocalSubnet.

  profile - Configuration profile (optional).
      CURRENT  - Applies to the active profile.  Active profile can be domain,
                 standard (i.e. private), or public. (default).
      DOMAIN   - Applies to the domain profile.
      STANDARD - Applies to the standard (i.e. private) profile.
      ALL      - Applies to the domain and standard (i.e. private) profile.
                 Does not apply to the public profile.

  Remarks: 'scope' must be 'CUSTOM' to specify 'addresses'.
           `addresses' can not contain Unspecified or Loopback addresses.

  Examples:

      add allowedprogram C:\MyApp\MyApp.exe "My Application" ENABLE
      add allowedprogram C:\MyApp\MyApp.exe "My Application" ENABLE CUSTOM
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,
          12AB:0000:0000:CD30::/60,LocalSubnet
      add allowedprogram program=C:\MyApp\MyApp.exe name="My Application"
          mode=DISABLE
      add allowedprogram program=C:\MyApp\MyApp.exe name="My Application"
          mode=ENABLE scope=CUSTOM addresses=157.60.0.1,
          172.16.0.0/16,10.0.0.0/255.0.0.0,
          12AB:0000:0000:CD30::/60,LocalSubnet

      IMPORTANT: "netsh firewall" is deprecated;
      use "netsh advfirewall firewall" instead.
      For more information on using "netsh advfirewall firewall" commands
      instead of "netsh firewall", see KB article 947709
      at http://go.microsoft.com/fwlink/?linkid=121488 .

[/EDIT]

[EDIT2]

SQL Server listens on 1433 as can be seen here

[/EDIT2]

11
  • 1
    . . . . This one too netsh advfirewall firewall add rule name="Allow SSMS Database Engine connections inbound on TCP 1433" dir=in action=allow protocol=TCP localport=1433 profile=domain,private... If you need PUBLIC then change profile=domain,private to be profile=domain,private,public as well for both commands Commented Jul 25, 2016 at 0:21
  • @PIMP_JUICE_IT, check my edit for the results running the first command. I'm running Win 8.1 with SQL Server 2012 Express.
    – Igor
    Commented Jul 25, 2016 at 12:39
  • Here you go, use this for the SQLServer.exe FW rule... just plug in the values for the valid path to the EXE file on this server/PC though... also ensure that the TCP port number is valid for the other command I wrote above too... netsh advfirewall firewall add rule name="Microsoft SQL Server 2014 Database Engine Access" dir=in action=allow program="C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Binn\Sqlservr.exe" enable=yes profile=domain,private Commented Jul 25, 2016 at 12:46
  • @PIMP_JUICE_IT, that command finished successfully. And SQL Server does listen on 1433 as can be seen in the image from edit-2. Still trying "busybox telnet 192.168.1.4 1433" gives "can't connect to remote host: Connection refused". Any idea?
    – Igor
    Commented Jul 26, 2016 at 2:40
  • @PIMP_JUICE_IT, the machine where the server is - 192.168.1.4, the client is Linux box - 192.168.1.2. Now how do I completely disable Win FW? And should I disable CoMoDo as well?
    – Igor
    Commented Jul 26, 2016 at 2:51

0

You must log in to answer this question.

Browse other questions tagged .