An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
Hello @Inderjit Singh,
Thanks for reaching out to Microsoft Q&A.
As discussed, you are trying to connect to the PostgreSQL server from on‑premises, but the connection is failing because the server is configured for private access only. In this scenario, you need to add a host entry in your local hosts file.
Please add the required host entry to your local hosts file and then try connecting to the SQL server, it should work.
**Reference:
**Configure Azure VPN Client optional settings - Azure VPN Gateway | Microsoft Learn
https://github.com/dmauser/PrivateLink/tree/master/DNS-Integration-P2S
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".