SQL Server Firewall Blocking replication even with Port 1433 allowed

  • I have two servers, Server 1 and Server 2, both are stand-alone, Windows Server 2016 with SQL Server 2017 using default instance. They are not members of a domain, and connected over a VPN (using Neorouter).

    I am trying to set up replication using a push subscription from Server 1 (local) to Server 2 (remote).

    I have created a firewall rule to allow port 1433 through and I have set Server 2 to listen on that port only on the VPN IP address. Server 2 is a default instance so dynamic ports should not be an issue; nevertheless, I have turned on SQL browser and have also allowed port 1434 UDP through the firewall.

    I have no problem connecting to Server 2 using SSMS and also when using the create subscription wizard, I can connect to Server 2 to select the target database. When the subscription job runs, however, it fails with a ‘cannot connect to subscriber’ error. I have tried impersonation and using a SQL login, same problem with both.

    This seems to be a firewall issue because when I temporarily turn off the firewall on Server 2, the job runs fine.

    I can’t see anything in the firewall log to tell me what the problem is, I can see the connection from Server 1 on port 1433 but it just shows action ALLOW and path as RECEIVE.

    Any suggestions as to what I need to do on the firewall

  • Maybe failing on the snapshot bit which uses different ports

    https://docs.microsoft.com/en-us/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access?view=sql-server-2017

    Replication connections to SQL Server use the typical regular Database Engine ports (TCP port 1433 for the default instance, etc.)

    Web synchronization and FTP/UNC access for replication snapshot require additional ports to be opened on the firewall. To transfer initial data and schema from one location to another, replication can use FTP (TCP port 21), or sync over HTTP (TCP port 80) or File Sharing. File sharing uses UDP port 137 and 138, and TCP port 139 if it using NetBIOS. File Sharing uses TCP port 445.

    Or if it is a named instance it may be using a different port.

    Does your firewall log show which ports were blocked or which ports the replication process was trying to use?

  • The only port request showing on my firewall log is 1433

  • OK, I figured it out eventually - Port 137 has to be enabled on Server 2

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply