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

jimbo ippie 1 Reputation point
2022-11-07T14:14:14.917+00:00

Hi I've have a newly setup computer with SQL Server 2019 installed. TCP/IP had been enabled as shown:
257893-115%C3%B8i20221107055437.png

257808-115%C3%B8i20221107055459.png

257934-115%C3%B8i20221107055525.png

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.

257922-115%C3%B8i20221107051514.png

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.
12,697 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Bjoern Peters 8,781 Reputation points
    2022-11-07T15:15:14.98+00:00

    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
    2022-11-07T18:05:20.753+00:00

    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.

    257919-115%C3%B8i20221108015058.png

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

    257956-img-4821.jpg

    Since I can access the React page from my phone, that means the SQL machine is still accessible at the 192.168.0.115 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 7,056 Reputation points
    2022-11-08T07:41:13.827+00:00

    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