Hello @Reinis Tropiņš ,
Apologies for the delay in response.
I understand that you have a conditional forwarder in your Azure VNET that is linked with the Private Zone - azurestaticapps.net, that points to 168.63.129.16, however, when trying to query the non-azure DNS Server, query always responds with public IP address and the Conditional Forwarder is ignored completely.
You can find all the details regarding conditional forwarding & the recommended config by Azure in the below doc:
https://github.com/dmauser/PrivateLink/tree/master/DNS-Integration-Scenarios#41-which-conditional-forwarder-zone-should-be-used
"There are reports that BIND-based DNS Servers (including Infoblox) work using conditional forwarders towards the privatelink.PaaS-domain zone (example: privatelink.blob.core.windows.net for storage accounts) without any issues. Therefore, please validate in your environment before deciding between adding the privatelink .PaaS-domain zone (privatelink.blob.core.windows.net as an example for storage accounts) or the default/Public PaaS zone (blob.core.windows.net)."
Most of On-premises DNS servers fall into the category where they will have a forwarder setup to point to another DNS server in customer's DMZ or point to ISP DNS Servers. Hence, conditional forwarding to the Public DNS forwarder is recommended because it is easy to implement.
Please check how your OnPrem DNS is configured and you may have an option to configure conditional forwarders to the PaaS domain zone or subdomain zone private link returned by the CNAME.
In your case, for Static webapps, the recommended Public DNS zone forwarder is either azurestaticapps.net or {partitionId}.azurestaticapps.net.
Refer : https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns#azure-services-dns-zone-configuration
Since, your Static webapp has a FQDN "mango-field-9c2719f03.1.azurestaticapps.net" which has a partition ID "1", I would advise you to setup the on-prem conditional forwarding to "1.azurestaticapps.net" and check again.
Could you please try the below setup:
Azure VM - 10.1.0.5 - Conditional forwarder pointing to - 168.63.129.16 for the zone 1.azurestaticapps.net
On-prem VM - 10.1.1.5 - Conditional forwarder pointing to - 10.1.0.5 for the zone 1.azurestaticapps.net
Kindly let us know if the above helps or you need further assistance on this issue.
----------------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.