I had this issue and spent 3 days trying to find an answer.
- The virtual network in Azure is assigned a local VM DNS server (internal IP)
- Azure VPN client showed the DNS server when connected and IpConfig did NOT show the dns server
- Powershell Get -DnsClientNrptPolicy showed the correct local dns server was assigned
- Could not resolve any internal IP addresses in the azure network as nslookup always used the lan/wlan dns server for resolution
- Followed every step for setting up DNS forwarders for file shares and privatelink
- Still could not resolve any internal IP addresses in the azure network as nslookup always used the lan/wlan dns server for resolution
The answer turns out to be ridiculously simple but took me 3 days to finally resolve. Modify the xml file that you download from the azure portal for the vpn client to add the in the dnssuffixes you want resolved via the vpn (make sure to put the (.) before typing out the domain name
Nslookup immediately returned the correct internal IP's of every query. Since I had also setup an azure file share and had setup the forwarders for it in the DNS server I added the dns suffix ".core.windows.net" and now mapping drives resolves to the internal IP. Anyway, I hope this helps because this was a ridiculous problem I spent HOURS and HOURS trying to find an answer.
How do I add DNS suffixes to the VPN client?
You can modify the downloaded profile XML file and add the <dnssuffixes><dnssufix> </dnssufix></dnssuffixes> tags.