Study guide

7.3 Public IP Addresses and NAT Patterns

AZ-104 Microsoft Azure Administrator Study Guide Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Orientation and Microsoft Learn Source Control

1.1 Current AZ-104 Exam Facts 1.2 Administrator Role and Candidate Profile 1.3 Skills Outline and Weighted Study Map 1.4 Exam Duration, Question Types, Labs, and Learn Access 1.5 Scoring, Retakes, Renewal, and Account Choice 1.6 Using the Practice Bank, Labs, and Error Log

2 Chapter 2: Identity, RBAC, and Governance Foundations

2.1 Microsoft Entra Users, Groups, and Properties 2.2 Licenses, External Users, and SSPR 2.3 Azure RBAC Built-In Roles and Scopes 2.4 Role Assignment Interpretation and Deny Effects 2.5 Management Groups, Subscriptions, and Resource Groups 2.6 Azure Policy, Locks, Tags, and Governance Controls 2.7 Identity and Governance Case Lab

3 Chapter 3: Subscriptions, Policy, Costs, and Resource Organization

3.1 Subscription Design and Management Groups 3.2 Resource Groups, Lifecycle, and Move Operations 3.3 Tagging Strategy and Cost Allocation 3.4 Budgets, Alerts, and Azure Advisor Cost Recommendations 3.5 Policy, Initiative, Assignment, and Remediation 3.6 Resource Locks, RBAC, Policy, and Tags Combined 3.7 Governance and Cost Case Lab

4 Chapter 4: Storage Accounts, Access, and Data Protection

4.1 Storage Account Design, Redundancy, and Encryption 4.2 Storage Firewalls, Private Access, and Network Rules 4.3 SAS Tokens, Stored Access Policies, and Access Keys 4.4 Identity-Based Access for Azure Files 4.5 Blob Tiers, Lifecycle, Soft Delete, and Versioning 4.6 Azure Files, Snapshots, File Sync, and AzCopy 4.7 Storage Case Lab

5 Chapter 5: Compute, Virtual Machines, Scale Sets, and Bicep

5.1 ARM Templates, Bicep, and Deployment Workflow 5.2 Create, Configure, and Manage Virtual Machines 5.3 VM Disks, Sizes, Encryption, and Host Settings 5.4 Availability Zones, Sets, and VM Scale Sets 5.5 Move VMs Across Resource Groups, Subscriptions, and Regions 5.6 Backup, Restore, and Operational Maintenance for VMs 5.7 VM Compute Case Lab

6 Chapter 6: Containers, App Service, and Platform Compute

6.1 Azure Container Registry and Image Workflow 6.2 Azure Container Instances and Container Apps 6.3 Container Sizing, Scaling, and Environment Choices 6.4 App Service Plan, Apps, and Runtime Configuration 6.5 App Service Certificates, TLS, Custom Domains, and Networking 6.6 App Service Backups, Deployment Slots, and Scaling 6.7 Platform Compute Case Lab

7 Chapter 7: Virtual Networking, Routing, and Secure Access

7.1 VNet, Subnet, and Address Space Design 7.2 VNet Peering and Cross-Network Connectivity 7.3 Public IP Addresses and NAT Patterns 7.4 User-Defined Routes and Effective Routes 7.5 NSGs, ASGs, and Effective Security Rules 7.6 Azure Bastion, Service Endpoints, and Private Endpoints 7.7 Secure Networking Case Lab

8 Chapter 8: Name Resolution, Load Balancing, and Connectivity Troubleshooting

8.1 Azure DNS, Private DNS, and Name Resolution 8.2 Public and Internal Load Balancer Design 8.3 Backend Pools, Health Probes, and Load Balancing Rules 8.4 Load Balancing Troubleshooting Workflow 8.5 Network Watcher: IP Flow, Next Hop, and Connection Troubleshoot 8.6 Hybrid Connectivity, VPN, ExpressRoute, and DNS Considerations 8.7 Connectivity Troubleshooting Case Lab

9 Chapter 9: Monitoring, Alerting, Backup, and Site Recovery

9.1 Azure Monitor Metrics, Logs, and Diagnostic Settings 9.2 Log Analytics, KQL, and Operational Queries 9.3 Alert Rules, Action Groups, and Alert Processing Rules 9.4 VM, Storage, and Network Insights 9.5 Recovery Services Vault, Backup Vault, and Backup Policies 9.6 Azure Site Recovery, Failover, and Replication 9.7 Monitoring and Recovery Case Lab

10 Chapter 10: AZ-104 Integration and Troubleshooting Case Labs

10.1 Domain Weight Triage and Study Prioritization 10.2 Identity, Storage, and Compute Integrated Cases 10.3 Networking, Monitoring, and Security Integrated Cases 10.4 Migration, Move, Backup, and Recovery Cases 10.5 Permissions, Network, and Storage Troubleshooting Chain 10.6 Microsoft Learn Lookup Strategy Under Time Pressure 10.7 Full-Domain Case Lab

11 Chapter 11: Final Review, Exam Experience, Renewal, and Career Path

11.1 Final Two-Week Study Plan 11.2 Hands-On Lab Checklist and Command Review 11.3 Exam Day, Pearson VUE, Breaks, and Learn Access 11.4 Retake Plan, Score Report, and Weak-Domain Repair 11.5 Renewal Assessment and Annual Certification Maintenance 11.6 After AZ-104: AZ-305, AZ-400, SC-500, and Job Paths

7.3 Public IP Addresses and NAT Patterns

Key Takeaways Explain This Topic AI

Public IP resources provide internet-reachable addresses for Azure resources, but many secure designs avoid assigning public IPs directly to VMs.

SKU, allocation, zone configuration, routing preference, and association target affect how a public IP can be used.

NAT Gateway provides scalable outbound SNAT for subnets and is often preferred over per-VM public IPs for outbound-only access.

Inbound access should usually be handled through load balancers, application gateways, Bastion, or private access patterns rather than direct VM exposure.

AZ-104 scenarios often distinguish inbound reachability, outbound internet access, and management access.

Last updated: May 2026

Public IPs are resources, not just properties

In Azure, a public IP address is its own resource. It can be associated with supported targets such as a VM network interface, a public load balancer frontend, an application gateway, a VPN gateway, Azure Firewall, Bastion, or NAT Gateway depending on the design. The administrator chooses the SKU, allocation behavior, IP version, region, zone setting, and sometimes routing preference.

The main exam discipline is to ask why the public IP is needed. If the requirement is inbound web access to multiple VMs, a public load balancer or application gateway is usually better than individual VM public IPs. If the requirement is administrator RDP or SSH without exposing VM public IPs, Azure Bastion is the secure access pattern. If the requirement is outbound internet access from private VMs, NAT Gateway is often the clean answer.

Decision table:

Requirement Common answer Why

Public HTTP or HTTPS app with Layer 7 routing Application Gateway HTTP-aware routing, TLS, WAF option.

Public TCP/UDP distribution across backend VMs Public Load Balancer Layer 4 load balancing.

Private VMs need stable outbound internet SNAT NAT Gateway Subnet-level outbound with scalable SNAT.

Admin needs RDP or SSH with no VM public IPs Azure Bastion Browser-based or native client management over private IP.

Site-to-site VPN public endpoint VPN gateway public IP Gateway requires public endpoint for VPN negotiation.

Public IP SKU and association awareness

Azure public IPs have SKU and configuration constraints. Standard SKU is the normal production choice for modern secure designs and is used by many platform resources. Basic SKU is legacy in many scenarios and lacks features administrators expect from Standard. On the exam, pay attention to whether the public IP must be zone-redundant, used with a Standard load balancer, or associated with a service that requires Standard.

Allocation matters too. Static public IPs keep the address until the resource is deleted or dissociated according to resource behavior. Dynamic allocation can change when a resource is stopped and deallocated or recreated. If a partner must allowlist an IP address, dynamic is usually wrong. If a DNS record points to a public IP that must not change, choose static.

Portal path: Azure portal > Public IP addresses > Create . After creation, inspect Overview , Configuration , and Associated to . Many troubleshooting cases are solved by discovering that a public IP is unassociated, associated with the wrong target, or not compatible with the intended resource.

  • CLI example: az network public-ip create \
  • -resource-group rg-network \
  • -name pip-appgw-prod \
  • -location eastus \
  • -sku Standard \
  • -allocation-method Static \
  • -zone 1 2 3
  • NAT Gateway for outbound access

NAT Gateway is associated with one or more subnets. Resources in those subnets use the NAT Gateway public IP or public IP prefix for outbound internet connectivity. This avoids assigning public IPs to every VM and gives a more predictable outbound source address for firewall allowlists and partner integrations.

  • Simple outbound diagram: private VM 10.41.1.4
  • |
  • subnet snet-app associated to NAT Gateway
  • |
  • NAT Gateway -> public IP 20.50.60.70 -> internet API

This is outbound connectivity. NAT Gateway does not publish an inbound listener to your VM. If the requirement is that internet users must reach a website hosted on private VMs, use a public load balancer, application gateway, or another publishing service. If the requirement is only that private VMs call Microsoft updates, package repositories, or partner APIs from a consistent public source IP, NAT Gateway is a strong answer.

NAT Gateway also helps with SNAT port exhaustion compared with relying on default outbound access or a small number of load balancer outbound rules. If many VMs or high connection rates need outbound internet, NAT Gateway with sufficient public IP resources is a standard operational pattern.

  • CLI outline: az network nat gateway create \
  • -resource-group rg-network \
  • -name nat-app-prod \
  • -location eastus \
  • -public-ip-addresses pip-nat-prod
  • az network vnet subnet update \
  • -resource-group rg-network \
  • -vnet-name vnet-prod-eastus \
  • -name snet-app \
  • -nat-gateway nat-app-prod
  • Inbound management is not the same as public access

A common AZ-104 trap is adding a public IP to a VM so administrators can connect. That may work technically, but it often violates the requirement to avoid exposing management ports. Azure Bastion lets administrators connect to private IPs over TLS through the portal or supported client flows. Just-in-time VM access can reduce exposure when public management is unavoidable, but Bastion is the better fit when the scenario explicitly says no public IPs on VMs.

NSGs still matter. A public IP associated to a VM NIC does not mean all ports are open. The subnet NSG, NIC NSG, VM host firewall, and application listener must all allow the traffic. Conversely, a NAT Gateway does not require inbound NSG rules for internet clients because it is not hosting inbound connections.

Troubleshooting workflow

For inbound failure, start at the published endpoint. Is the public IP associated with the intended load balancer, gateway, firewall, or NIC? Does DNS point to the correct IP? Does the frontend rule or listener exist? Does the backend health probe pass? Does the NSG allow the destination port? Is the application listening on the expected private port?

For outbound failure, start from the subnet. Is a NAT Gateway associated? Is a route table sending 0.0.0.0/0 to a firewall or virtual appliance instead? Does the firewall allow the destination? Does the remote service allowlist the NAT public IP or the firewall public IP? Are you testing from a VM in the correct subnet?

Network Watcher next hop is useful when the path is ambiguous. If next hop for internet is Internet , default system routing or NAT may be involved. If next hop is VirtualAppliance , an Azure Firewall or NVA route owns the path. If a forced-tunnel route sends all traffic to on-premises, NAT Gateway may not be used for that flow because the UDR is more specific or changes the next hop.

Scenario traps

Do not confuse public IP address with public DNS. You can have an address without a useful DNS name. Do not assign public IPs to backend VMs just because they need outbound updates. Use NAT Gateway or controlled egress. Do not assume NAT Gateway solves inbound publishing. Do not forget that load balancer outbound rules, NAT Gateway, Azure Firewall, and public VM IPs are different outbound source patterns.

A frequent exam scenario says that a partner allowlisted one IP, but outbound calls sometimes come from other addresses. Look for inconsistent egress: some subnets use default outbound, some use load balancer outbound rules, and some use NAT Gateway. The corrective action is to centralize and verify outbound through the intended NAT or firewall path, then update route tables and subnet associations.