SQL Server : replication between two different locations I have problem setting my replication between two servers on different locations (different network).

Steps I have done:


setup aliases in SQL Server Native Client configuration on both servers
setup ports on both server
created Windows accounts on both server and run SQL Server and SQL Agent under this account
created SQL Server users for replication with sysadmin permissions
checked that ports are opened and reachable
connected on both sides from Management Studio and connection works
I am almost sure that I have done this correct, because I have done it 100 times....


Then I made replication on publisher server using exact procedure as described here: http://www.sql-server-performance.com/2010/transactional-replication-2008-r2/2/

In Replication Monitor I get error:


  Error messages:
  The process could not connect to Subscriber 'XXX'. (Source: MSSQL_REPL, Error number: MSSQL_REPL0)
  Named Pipes Provider: Could not open a connection to SQL Server [53].  (Source: MSSQLServer, Error number: 53)
  A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. (Source: MSSQLServer, Error number: 53)
  Login timeout expired (Source: MSSQLServer, Error number: HYT00)


As I can see I have the same problem than in this post:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b5095a7f-e015-4086-a8cc-c31abb022aa4/transactional-replications-problem?forum=sqlreplication

But there were no solutions to it...
Ok it was problem that Windows block cross domain connections.

Error in error log:
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

I had to make new local Windows account and used it for replicaton snapshot agent.