Hi Udbhav Jain,
Good day,
As an original poster cannot accept their own answer, I am reposting it so that you can accept it an answer. Accepted answer will help other community members navigate to the appropriate solutions.
Issue: Cannot get Private DNS Resolver to work in P2S setup
Solution:
- Added a Firewall resource in the hub VNet.
- In the Firewall policies, enabled the application of DNS settings to policies, and then enabled DNS proxy. Left the DNS server setting to default.
- Changed the DNS address in the VPN XML config file to the private IP address of the Firewall.
Now I can ping to the VMs in the spokes using their FQDNs. Nothing else was changed in the network setup, the DNS queries from the on-premises client just needed to go through a proxy rather than going directly to the inbound endpoint.
If you have any further concerns, please do not hesitate to contact us. We are pleased to help you.
If the information is helpful, please click on "Upvote" and "Accept Answer" so that it would be helpful to other community members.