I’m trying to take my first steps in Cloudflare for Teams (free plan) and I want to create a connection with SQL Server via tunnel/WARP. I think I have done all the steps that are described in the docs, but I have that error 10054 (SSMS message):
“A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)”
Here is my tunnel config:
- hostname: db.mydomain.xx.xx
- hostname: test.mydomain.xx.xx
- service: http_status:404
Test ‘hello_world’ works fine.
Connection via OpenVPN works fine.
Trying to connect to “db.mydomain.xx.xx, 1433” gives that error.
Maybe someone can suggest how to fix this?
When I connect using OpenVPN, I specify server IP in virtual TUN network: 10.8.0.1, 1433.
But if I write something like “myname.ddns.net,1433” in the connection string, then I get exactly the same error 50012 (“A connection was successfully established with the server, but then…”).
Maybe I need to write the server IP address to connect through the Tunnel? How? Which one?
Maybe I need to do “cloudflared route ip”?
So I created the route as described in this tutorial.
cloudflared tunnel route ip add 192.168.88.0/24 mytunnelname
(192.168.88.0/24 - my private subnet)
I also removed from the list “Split Tunnel entries” the range that overlaps my IP values.
In the connection string or in the SSMS menu, I specify the server IP address ('SERVER=192.168.88.44;Database=…;UID=…; …etc… ’ ).
Now it works.
Sorry, but I’m not competent enough to mark this answer as a “solution”. I’m not sure if this is the right move, because I can’t figure out the reasons for the error.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.