Azure Files with a private endpoint works by IP but not by name
On-premises DNS doesn't know about the privatelink zone. Forward it to Azure DNS.
What happened
An Azure Files share with a private endpoint could be reached by its private IP, but \\account.file.core.windows.net\share failed from on-premises machines.
Why
The name resolves through the privatelink.file.core.windows.net private DNS zone in Azure. On-premises DNS servers don’t know about it, so they return the public IP, which is blocked.
Fix
Add a conditional forwarder for file.core.windows.net (or the privatelink zone) on the on-premises DNS servers, pointing to a DNS resolver in Azure: an Azure DNS Private Resolver inbound endpoint, or a DNS VM forwarding to 168.63.129.16.
Seeing this in your environment?
We can check for this, and everything around it, as part of an audit.