January 25, 2013 at 12:01 pm
Hello everyone,
I am trying to connect to a remote sql server using stunnel. I have already configure the stunnel.conf file on both side.
When I am connect to the remote SQL Server, I am getting the following error:
"A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)"
My remote server is configured to accept unlimited connections.
Any suggestions or ideas?
Thank you
January 29, 2013 at 6:33 am
I'm not too familiar with stunnel but you could check your logins on the instance. Does the specified login have the required permissions?
Andrew
January 29, 2013 at 11:13 am
Thank you for your reply
The login has the proper permission.
I forgot to mention that I was able to connect to the remote SQL server from within our network.
From outside the network, I am getting the error. I can telnet to the SQL server.
Also the network administrator is telling me that there is no firewall blocking incoming traffic to the specified port.
January 29, 2013 at 11:32 am
Are you using a SQL Server authenticated account to login?
January 29, 2013 at 12:06 pm
Yes I am
January 29, 2013 at 12:13 pm
OK, as you can connect to the instance within the network the problem is not there.
Have you tried specifying the port in the connection to the instance?
January 29, 2013 at 12:26 pm
Yes I have tried,
Basically, Stunnel allows you to encrypt the TCP connection between the client and the SQL server using SSL. On both side, you install stunnel and configure it.
Client side
Accept connection on 127.0.0.1:1433
Connect to x.x.x.x:443 (x.x.x.x being the external ip address of the SQL server, and 443 being the only open port to the SQL Server)
Server Side
Accept all incoming connection on 443
connect to 127.0.0.1:1433
From the client side, you open SSMS and connect to 127.0.0.1, and stunnel redirect the traffic to 127.0.0.1:1433 on the SQL Server
January 29, 2013 at 12:31 pm
If you can connect to the instance from the client side with SSMS then the problem must be with stunnel.
Sorry I'm not familiar with stunnel.
January 29, 2013 at 12:40 pm
When both machines belong to the same network (replacing the x.x.x.x with the internal IP address of the SQL server), I have no problem connecting to the SQL server through Stunnel. However, when the client is outside our network, I am getting the error.
Anyway, thank you for your help.
January 29, 2013 at 12:43 pm
Same error when connecting in SSMS?
January 29, 2013 at 12:52 pm
Yes
January 29, 2013 at 12:58 pm
In the SQL Server Configuration Manager, is TCP/IP and Names Pipes enabled for remote connections?
If they have recently be changed the instance will also need to be restarted.
January 29, 2013 at 1:09 pm
Both TCP/IP and Names Pipes have been enabled in the SQL Server
January 29, 2013 at 1:15 pm
Alright this is starting to bug me now.
Can you have a look at the Windows Firewall settings on the server running SQL?
January 29, 2013 at 1:22 pm
Sorry! Just realised that the firewall won't be the problem.
Try connecting again and have a look at the SQL Server error logs and the application/system event logs.
Viewing 15 posts - 1 through 15 (of 20 total)
You must be logged in to reply to this topic. Login to reply