Hello Rémi Céraline
Greetings!
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!
Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution.
Please click "Accept" the answer as original posters help the community find answers faster by identifying the correct answer.
Issue: Configuring DNS with Azure VPN Client and Private DNS Resolver to Resolve Private Endpoint DNS
Resolution:
From your research, the issue might be related to the Name Resolution Policy Table (NRPT) in Windows. When you run the command Get-DnsClientNrptPolicy
, it displays the list of domain names with the correct DNS server assigned, but the resolution still doesn’t work as expected.
You adjusted the VPN interface to have the highest priority by assigning it a value of 1 for the InterfaceMetric.
It appears that your machine is using the DNS from the default network interface, which is 192.168.2.1. As a result, the default networking interface resolution is directing traffic to the public network. Additionally, it seems that nslookup was ignoring the NRPT.
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.
Thanks,
Praveen