I have a simple Virtual network in Azure with the address space 192.168.128.0/24, and it has 2 subnets,
subnet1: 192.168.128.0/25
GatewaySubnet: 192.168.128.128/28
I have a SQL Server instance, which first allowed public/azure connections and I managed to connect with SSMS just fine before the VPN. It now has a Private Link with the subnet1, and has the IP 192.168.128.4 assigned to it, just so I can close the public access to the server. I also have a Virtual Network Gateway for VPN connections, it's been properly configured (I think), and Clients connect to it and receive IP addresses from its address pool just fine.
The problem is that I can't reach the SQL Server from the VPN connection. Clients can't reach the SQL Server instance by ip address, and if I try to reach it by name, it goes through the open internet (I know because a ping resolves the public ip address of database.windows.net, and when the firewall settings allowed outside connections, it asked me to add this ip address to the whitelist to connect with SSMS). I suspect it's DNS related, but I am not sure how to proceed with this.
To be clear, I can't reach the SQL Server from the VPN with neither the Private Link, nor the regular Services Endpoints enabled and firewall rules allowing outside connections.
These answers were checked too and didn't apply to me. I uninstalled the client and redownloaded it and still nothing. Azure Point-To-Site VPN subnetting issues
Azure point-to-site VPN can't reach subnet
Thanks for your help.