sql server on vpn

Andy R 21 Reputation points
2021-09-15T13:22:15.627+00:00

Hi all,
I configured a pc with sql server to be able to access remotely (always internal lan) from the other pc on the network. And works.
I would like to try now to configure to be able to access it remotely (not lan). These two locations have fixed IPs .
Does anyone have a guide on how to create a VPN and be able to configure my connection string of my application to be able to access the pc where there is sql server?

Of course it must be a safe way.
thanks for support

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

5 answers

Sort by: Most helpful
  1. Philippe Levesque 5,706 Reputation points
    2021-09-15T14:59:45.05+00:00

    Hi

    We miss detail as we will need the router model to be able to give some example if you want to do it the best way possible.

    In big it's a site to site vpn you should look at.

    That way when the client try to speak to the SQL server, which is on another LAN, the router route correctly the packet fort and back to that site without user intervention.

    In example if your LAN where your PC are is 192.168.0.X, you could add the other LAN as 192.168.1.X, which the router will route correctly between the two site.

    The public IP you have will make it easier to keep the tunnel up.

    0 comments No comments

  2. Andy R 21 Reputation points
    2021-09-16T02:24:17.05+00:00

    Hi,
    Thanks for the reply.
    Regarding the router, that's one of the things I know how to do.
    I go to configuration and do a port forwarding on the affected pc.
    But on a practical level, how should everything else be done?
    Is there a guide to open a VPN safely between two PCs (not in the same building)?
    Thanks

    0 comments No comments

  3. AmeliaGu-MSFT 13,971 Reputation points Microsoft Vendor
    2021-09-16T06:08:21.783+00:00

    Hi AndyK-3935,

    Is there a guide to open a VPN safely between two PCs (not in the same building)?

    Please check the following articles which might be helpful:
    Step by Step How to Install and Configure VPN in Windows Server
    Virtual Private Networking (VPN)
    Set up L2TP/IPSec VPN on Windows Server

    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    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

  4. Andy R 21 Reputation points
    2021-09-16T06:18:36.077+00:00

    thanks,
    but I don't have a server, I have two PCs..
    and one of them has to enter in to read sql server..
    tks


  5. AmeliaGu-MSFT 13,971 Reputation points Microsoft Vendor
    2021-09-17T06:52:54.96+00:00

    Hi AndyK-3935,
    Thanks for your reply.
    Please check:
    Connect to a VPN in Windows 10
    Windows 10 VPN technical guide
    For more questions about VPN, it is better to open a thread in the tag windows-10-network, so that people there can help you more efficiently.

    Best Regards,
    Amelia

    0 comments No comments