SQL Server unable to connect when VPN is installed (even when VPN is not active)

jimbo ippie 1 Reputation point

Hi I've have a newly setup computer with SQL Server 2019 installed. TCP/IP had been enabled as shown:



I can connect to SQL server via both desktop name as well as IP address.

However, after I installed a VPN app called Astrill, SSMS can no longer connect using the IP address. SSMS popped up error message with SSL Provider error 0 and Microsoft SQL Server Error 10054.
SSMS still connects with desktop name. Other client apps using the SQL Server cannot connect neither.


This is the case even when the VPN app is not running.
If I uninstall the Astrill app, everything works fine again.

Any suggestions / advice will be much appreciated.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,881 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Bjoern Peters 8,601 Reputation points

    Hi @jimbo ippie

    this is a normal process ;-)

    A VPN assigns you a new anonymous IP address, reroutes your internet connection through a server in its network, and encrypts your data.

    So a.) you SQL Server is not listening anymore to that configured IP-address and b.) traffic is encrypted
    If you are using the desktop name... even with VPN this name points directly to the active IP address, and if you are using your "old" IP address that is not available anymore by using a VPN.
    This explains also why everything is back to normal.

    If you want other apps connect to your SQL (in combination with installed VPN) then you have to activate the encryption (trust certificates) on your connection and always use the DNS name.

    0 comments No comments

  2. jimbo ippie 1 Reputation point

    Hi @Bjoern Peters thanks very much for your insights.
    To examine this change of IP address possibility, I've setup a simple React server (listening to port 3000) on the same machine where I have the SQL.


    And then I access it from my phone which is also connected to the same Wifi router.


    Since I can access the React page from my phone, that means the SQL machine is still accessible at the address. Also, the data from the React app is not encrypted.
    Please let me know if my logic is flawed.

    I do have SQL and Astrill installed on another server that is working. I just can't seemed to find the differences between the two machines settings...

    0 comments No comments

  3. YufeiShao-msft 6,991 Reputation points

    Hi @jimbo ippie ,

    If you said even when VPN is not active, then is it possible to suspect that the vpn is not set up correctly?

    Please make sure the server has remote connection enable, can you find out the port number it is listening on, make sure the ip address the VPN provided is not blocked by the firewall, this can be caused because of DNS issues with VPN connection


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments