Azure Storage Account access logs CallerIpAddress is showing Private IP Address

Apurva Pathak 845 Reputation points
2025-11-24T16:46:21.4466667+00:00

Hello folks,
I have an Azure Storage account that I’m trying to access from an Azure Win19 VM. The storage account is configured to allow public access only from specific public IP addresses.

When I attempt to access the storage blob from the VM, I receive a 403 (Network blockage) error, even though I’ve allowed the public IP assigned by Microsoft under default outbound access, when I check the StorageBlobLogs, the source IP logged (CallerIpAddress) is the private IP of the VM—not the public IP given by MS under default outbound access.

To troubleshoot, I routed the traffic from the VM through our firewall, which has a dedicated public IP assigned via a Public Load Balancer. We can see the traffic hitting the firewall and being allowed. However, when I checked the StorageBlobLogs again, the source IP logged (CallerIpAddress) is the private IP of the firewall instance—not the public IP (again).

Initially, I assumed this was just a logging issue, but the access still fails even though the dedicated public IP is whitelisted.

Could someone please help me understand below:

  1. Why does Azure log the private IP (VM’s private IP in default outbound scenario, and firewall’s private IP when forced routing) instead of the public IP?
  2. Is there any way to ensure Azure recognizes the public IP for access control?
  3. If it's Azure logging issue, can we avoid it?

PFB snippet of the IP entry which we see.

{B5F7E519-3272-47A5-995B-A1C1805E371D} Any guidance would be greatly appreciated.

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 26,661 Reputation points Volunteer Moderator
    2025-11-28T14:12:08.46+00:00

    Hello Apurva Pathak,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your Azure Storage Account access logs CallerIpAddress is showing Private IP Address.

    This happens because when you use Service Endpoints or Private Endpoints, traffic flows through Azure’s internal backbone network, and the storage service logs the VM’s private IP by design. Therefore, even if you whitelist the public IP, the request will still be blocked since the logged source remains private.

    To resolve this and ensure the storage account recognizes the public IP, the most reliable approach is to route traffic through a NAT Gateway or Azure Firewall with SNAT enabled. This forces outbound traffic to use a designated public IP, which will appear in the logs and align with firewall rules. If you prefer to maintain private connectivity for security reasons, you should avoid relying on public IP-based firewall rules and instead configure Virtual Network rules or Private Endpoints with Private DNS zones. These methods are documented here: Azure NAT Gateway, Private Endpoint and DNS, and Storage Firewall and VNet rules.

    Finally, if your compliance or monitoring requirements demand public IP logging, you must disable Service Endpoints and Private Endpoints and allow public network access through a controlled NAT Gateway. Alternatively, for hybrid setups, use Azure Firewall or Application Gateway to manage SNAT and enforce outbound traffic policies. This ensures accurate CallerIpAddress logging while maintaining security. For implementation, see these docs on Configure NAT Gateway for subnets and Azure Firewall SNAT.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.