Most engineers think…
…that once IKE Phase 1 shows "established", the hard part is over and traffic will just flow.
Wrong. Phase 1 only opens the secure hotline. Phase 2 — the proxy-ID / traffic-selector handshake — is where Azure tunnels actually die, and it fails silently behind a green Phase 1. This whole lesson lives in that gap.
① The mental model — what each side brings to the tunnel
Think of an IPsec VPN as a private armoured tunnel dug between two buildings: your office on one side, your Azure VNet on the other. Before you touch a single field, get the picture straight — because Azure and the Palo Alto describe the same tunnel with completely different vocabulary, and that mismatch is where beginners get lost.
On the Azure side you build four objects. On the Palo Alto side you build eight. They meet in the middle over the public internet.
The one decision that decides everything: pick a route-based gateway, not a policy-based one, and run IKEv2. Since October 2023 the Azure portal only creates route-based gateways anyway, so you are usually on the right side by default — but if you inherited an old policy-based gateway, the Palo Alto will never come up cleanly.
Priya at Flipkart faces this
She built the Azure gateway from an old runbook, picked "policy-based", and now the Palo Alto IKE Gateway sits in init forever. No errors that make sense.
Policy-based Azure gateways are IKEv1-only and static-routing-only. Her Palo Alto IKE Gateway is set to IKEv2 — the two never agree on a version.
Check the Azure gateway's VPN type and the Palo Alto IKE version. They're on different IKE generations.
Azure: VNet Gateway → Configuration · PAN: Network → IKE Gateways → VersionRebuild the Azure gateway as route-based (the portal default), keep the Palo Alto on IKEv2 only mode.
show vpn ike-sa gateway azure-ike-gw now shows an IKEv2 SA negotiating instead of silence.
You're standing up a fresh Palo Alto-to-Azure VPN. Which Azure VPN Gateway type and IKE version should you choose?
② Phase 1 vs Phase 2 — where tunnels actually die
Here is the single most useful analogy for IPsec. Picture two embassies opening a secure hotline.
Phase 1 is the two embassies agreeing how to talk: they check each other's credentials (the PSK), pick a shared cipher and key-exchange group, and open the encrypted channel. In firewall terms this is the IKE SA.
Phase 2 is the embassies agreeing which citizens may cross — which subnets are allowed through the channel. Palo Alto calls this list a Proxy ID; the IKE spec (and Azure) call it a traffic selector. If the two sides don't describe the guest list as exact mirror images, Phase 2 fails — even though Phase 1 looked perfectly healthy.
See it come up — then watch it die
Press Play to step through a healthy bring-up, then Break it to see the failure most real tickets are about.
▶ How a Palo Alto ⇄ Azure tunnel negotiates
Four stages. Press Play for the healthy path, then Break it to see the classic Phase-2 failure.
0.0.0.0/0 ↔ 0.0.0.0/0; Azure (route-based) offers the same. They mirror → an ESP IPsec SA is installed.The four words you must own
Tap each card. These four ideas carry the whole lesson.
Peers authenticate with the PSK and agree encryption + DH group, building the secure IKE SA. So what: if it fails you see only "phase-1 negotiation failed" — start with PSK and IKE version.
The local/remote subnet pair PAN proposes in Phase 2 — the IKE "traffic selector". So what: it must mirror Azure's offer exactly, or Phase 2 dies while Phase 1 stays green.
Azure gateway that uses any-to-any (0.0.0.0/0) selectors and routes traffic into the tunnel. So what: this is the mode Palo Alto expects — match it with a 0.0.0.0/0 proxy-ID.
A logical Palo Alto interface in its own zone; routes point traffic into it. So what: no static route to tunnel.1 = the tunnel is "up" but zero traffic crosses.
Pause & Predict
Your tunnel shows Phase 1 established but Phase 2 won't come up and the log says NO_PROPOSAL_CHOSEN. Before you read on — name the one object that is almost always the cause. Type your guess.
0.0.0.0/0 offer.Aditya at Wipro faces this
His tunnel worked yesterday. Today a teammate "cleaned up" the config. Now Phase 1 is green, but show vpn ipsec-sa is empty and the log repeats IKE phase-2 negotiation is failed ... NO_PROPOSAL_CHOSEN.
The teammate narrowed the Palo Alto Proxy ID to 10.10.0.0/16 ↔ 10.20.0.0/16 "to be tidy". Azure (route-based) still offers 0.0.0.0/0 ↔ 0.0.0.0/0. The selectors no longer mirror.
Phase 1 SA present, Phase 2 absent = a traffic-selector mismatch, not a crypto or PSK problem.
Network → IPSec Tunnels → azure-ipsec-tunnel → Proxy IDsSet the Proxy ID back to Local 0.0.0.0/0, Remote 0.0.0.0/0 (or delete it so PAN proposes the universal selector). Commit.
test vpn ipsec-sa tunnel azure-ipsec-tunnel then show vpn ipsec-sa — the ESP SA now appears.
Phase 1 shows established, but Phase 2 won't form and the firewall logs NO_PROPOSAL_CHOSEN. What is the most likely cause on a Palo Alto-to-Azure tunnel?
③ Build it — Azure side, then Palo Alto side
Now the hands-on. We'll use one topology throughout: on-prem LAN 10.10.0.0/16 behind a Palo Alto with untrust IP 203.0.113.10, talking to an Azure VNet 10.20.0.0/16 fronted by a VPN Gateway at 20.55.10.20.
Azure side — four objects
Create the Virtual Network Gateway (route-based, SKU VpnGw2AZ, in a subnet named exactly GatewaySubnet, /27 or larger), a Standard Static Public IP, a Local Network Gateway for the Palo Alto, then the Connection. The Connection blade is where the tunnel is actually defined:
① Connection type = Site-to-site (IPsec). ② Shared key must byte-match the Palo Alto PSK. ③ IKE Protocol = IKEv2 for route-based. Leave Use policy based traffic selector = Disable for a normal route-based Palo Alto.
New-AzLocalNetworkGateway -Name lng-paloalto-hq -ResourceGroupName rg-net ` -Location "Central India" ` -GatewayIpAddress "203.0.113.10" ` -AddressPrefix "10.10.0.0/16" $gw = Get-AzVirtualNetworkGateway -Name vnetgw-prod-01 -ResourceGroupName rg-net $lng = Get-AzLocalNetworkGateway -Name lng-paloalto-hq -ResourceGroupName rg-net New-AzVirtualNetworkGatewayConnection -Name VNet-to-PaloAlto -ResourceGroupName rg-net ` -Location "Central India" ` -VirtualNetworkGateway1 $gw -LocalNetworkGateway2 $lng ` -ConnectionType IPsec -SharedKey "S2sVpnAzure!Psk#2026"
Name : VNet-to-PaloAlto ResourceGroupName : rg-net ConnectionType : IPsec ConnectionStatus : Unknown # becomes "Connected" once the Palo Alto side is up ProvisioningState : Succeeded
Palo Alto side — the eight objects
Build them in order: tunnel interface → IKE Crypto → IPSec Crypto → IKE Gateway → IPSec Tunnel → zone → static route → security policy. The two screens that trip people up are the IKE Gateway and the IPSec Tunnel's Proxy ID tab.
① The Proxy ID Local 0.0.0.0/0 ↔ Remote 0.0.0.0/0 is the field that mirrors Azure's route-based offer — get this right and Phase 2 installs. ② Tunnel Interface must be the tunnel.1 you created and put in the azure-vpn zone.
set network ike crypto-profiles ike-crypto-profiles azure-ike-crypto dh-group group14 hash sha256 encryption aes-256-cbc lifetime hours 8 set network ike crypto-profiles ipsec-crypto-profiles azure-ipsec-crypto esp encryption aes-256-cbc esp authentication sha256 set network ike crypto-profiles ipsec-crypto-profiles azure-ipsec-crypto dh-group no-pfs lifetime hours 1 set network ike gateway azure-ike-gw protocol version ikev2 set network ike gateway azure-ike-gw protocol ikev2 ike-crypto-profile azure-ike-crypto dpd enable yes set network ike gateway azure-ike-gw authentication pre-shared-key key S2sVpnAzure!Psk#2026 set network ike gateway azure-ike-gw local-address interface ethernet1/1 ip 203.0.113.10/24 set network ike gateway azure-ike-gw peer-address ip 20.55.10.20 set network ike gateway azure-ike-gw protocol-common nat-traversal enable yes set network tunnel ipsec azure-ipsec-tunnel auto-key ike-gateway azure-ike-gw set network tunnel ipsec azure-ipsec-tunnel auto-key ipsec-crypto-profile azure-ipsec-crypto set network tunnel ipsec azure-ipsec-tunnel tunnel-interface tunnel.1 set network tunnel ipsec azure-ipsec-tunnel auto-key proxy-id azure-any local 0.0.0.0/0 remote 0.0.0.0/0 protocol any set zone azure-vpn network layer3 tunnel.1 set network virtual-router default routing-table ip static-route to-azure-vnet destination 10.20.0.0/16 interface tunnel.1 set rulebase security rules trust-to-azure from trust to azure-vpn source 10.10.0.0/16 destination 10.20.0.0/16 application any service application-default action allow commit
Commit job 421 ... 100% Configuration committed successfully
0.0.0.0/0 proxy-ID. Enabling the policy-based selector forces you to list every subnet pair by hand.Azure's Default policy negotiates a weak DH Group 2 (1024-bit) for Phase 1. To run DH14 / AES-256 / SHA-256 like our config, define a Custom IPsec/IKE policy on the Azure Connection so both ends use the same strong set. Set it once on each side and it matches — half-matching just drops the tunnel at the first rekey.
Copy-pasting the Azure Shared key often drags a trailing space or newline into the Palo Alto PSK field. Phase 1 then fails with "authentication failed" and you swear they're identical. Re-type the key by hand on both ends.
Pause & Predict
Your Azure Connection is route-based and left at the Default policy. What exact Proxy ID should the Palo Alto IPSec Tunnel carry? Type it.
0.0.0.0/0 ↔ Remote 0.0.0.0/0. Route-based Azure negotiates any-to-any selectors, so the Palo Alto must mirror that with a single universal proxy-ID.Rahul at TCS faces this
Brand-new build. Phase 1 won't even start — IKE phase-1 negotiation is failed ... no proposal chosen — and he's triple-checked the PSK.
Crypto mismatch: he set DH14 on the Palo Alto but left the Azure Connection on the Default policy, which proposes DH Group 2 for Phase 1. They never agree.
"No proposal chosen" in Phase 1 = the encryption/DH/hash sets don't overlap.
PAN: Network → IKE Crypto · Azure: Connection → Configuration → IPsec/IKE policyDefine a matching Custom IPsec/IKE policy on the Azure Connection (DH14 / AES-256 / SHA-256), or drop the Palo Alto to DH2 to match Default. Make both ends identical.
show vpn ike-sa gateway azure-ike-gw shows an SA moving past the proposal stage.
Azure Connection is route-based, "Use policy based traffic selector" is Disabled. What Proxy ID belongs on the Palo Alto IPSec tunnel?
0.0.0.0/0 proxy-ID + zone + static route + policy. Crypto must match on purpose.④ Verify & troubleshoot — prove it from the logs
Never trust the config screen — trust the runtime. Three commands tell you the truth, in order: is Phase 1 up, is Phase 2 up, is the datapath active.
> show vpn ike-sa gateway azure-ike-gw > show vpn ipsec-sa > show vpn flow
# Phase 1 GwID Gateway Name Role Mode Algorithm Established ST 1 azure-ike-gw Init IKEv2 PSK/DH14/A256/SHA256 yes Estb # Phase 2 GwID Tunnel Algorithm SPI(in) SPI(out) life remain 1 azure-ipsec-tunnel ESP/A256/SHA256 0xC1A2B3 0xD4E5F6 3600 3540 # Datapath id name state monitor local-ip peer-ip tunnel-i/f 1 azure-ipsec-tunnel active up 203.0.113.10 20.55.10.20 tunnel.1
A saved config is a promise; show vpn ipsec-sa is the proof. If Phase 1 shows Estb but show vpn ipsec-sa is empty → Phase 2 / Proxy ID. If both SAs exist but nothing pings → routing and policy, not crypto.
That second case — tunnel up, no traffic — is the quiet killer. Proxy IDs only negotiate the SA; they never create a data path. You still need the static route into tunnel.1 and a security rule. And once real apps run, the Palo Alto must clamp MSS: Microsoft recommends MSS 1350 / tunnel MTU 1400 because IPsec headers plus Azure's 1360-byte clamp shrink the usable payload.
Pause & Predict
Both show vpn ike-sa and show vpn ipsec-sa are healthy, but nothing pings across. Is this a crypto problem or a routing problem? Type your call.
10.20.0.0/16 via tunnel.1 and a security policy allowing trust ⇄ azure-vpn.Sneha at Infosys faces this
All three status lights are green. IKE + IPsec SAs are up. Yet ping to the Azure VM times out, both directions, and packet capture shows nothing arriving from the far side.
No static route points 10.20.0.0/16 at tunnel.1, so the firewall has no reason to send VNet traffic into the tunnel — or tunnel.1 was never put in a zone with a permitting rule.
SAs up + zero traffic = routing/policy, not crypto. Check the route table and the security rulebase.
Network → Virtual Routers → default → Static Routes · Policies → SecurityAdd the static route 10.20.0.0/16 → tunnel.1, bind tunnel.1 to zone azure-vpn, and add bidirectional security rules. On Azure, confirm the Local Network Gateway lists 10.10.0.0/16.
test routing fib-lookup virtual-router default ip 10.20.0.4 resolves out tunnel.1, then ping succeeds.
Flaps after idle: Azure tears down an idle tunnel after ~5 minutes and DPD defaults to 45s — add a Tunnel Monitor so the tunnel never goes quiet. PAN behind NAT (a PA-VM with a NAT'd untrust IP): enable NAT Traversal and set explicit Local/Peer Identification. Many changing subnets at scale: stop hand-editing static routes — run BGP over the tunnel for auto-advertised prefixes and HA.
IKE and IPsec SAs are both established on the Palo Alto and Azure shows "Connected", but no traffic crosses either way. What do you check first?
The site-to-site IPsec engine has been quiet, but the wider PAN-OS VPN surface hasn't — keep firmware patched against issues like the actively-exploited GlobalProtect auth-bypass CVE-2026-0257 (CVSS 7.8) and the infamous CVE-2024-3400 (CVSS 10.0). On the exam side this is a two-cert crossover: the firewall half maps to Palo Alto's Network Security Generalist / NGFW Engineer (the role-based successors to the retired PCNSE), and the cloud half is squarely on Microsoft AZ-700.
show vpn ike-sa / ipsec-sa / flow. SAs up + no traffic = routing. Clamp MSS to 1350. Keep a tunnel monitor so Azure doesn't drop an idle tunnel.🤖 Ask the AI Tutor
Tap any question — instant, scoped to this lesson. No login, no waiting.
Pre-curated from Palo Alto docs + community Q&A, scoped to this lesson. For a live prod issue, paste your export into chat.techclick.in.
📝 Wrap-up assessment — six more
You've answered 4 inline. Six left. 70% (7 of 10) marks the lesson complete on your profile. Tap Submit all answers at the end.
🧠 In your own words
Type one line: Why does a route-based Azure VPN tunnel need a 0.0.0.0/0 ↔ 0.0.0.0/0 Proxy ID on the Palo Alto? Then compare to the expert version.
🗣 Teach a friend
Best way to lock it in — explain it in one line to a teammate. Tap to generate a paste-ready summary.
📖 Glossary
- IKE / ISAKMP
- The protocol that authenticates the two gateways and builds the secure key-exchange channel.
- IKE Phase 1
- Authenticates peers with the PSK and agrees encryption + DH group, building the IKE SA (the management channel).
- IKE Phase 2 (Quick Mode)
- Negotiates the traffic selectors / proxy-IDs and installs the ESP data SA.
- Proxy ID
- Palo Alto's name for the local/remote subnet pair a tunnel will encrypt — the IKE traffic selector.
- Traffic selector
- The source/destination network pair negotiated in Phase 2 that defines which traffic the SA protects.
- Route-based VPN
- An Azure gateway that uses any-to-any (0.0.0.0/0) selectors and routes traffic into the tunnel; needs IKEv2.
- Policy-based VPN
- An older Azure gateway that defines crypto per subnet pair — IKEv1-only and static-routing-only.
- Local Network Gateway
- The Azure object that represents the on-prem / Palo Alto side — its public IP plus the on-prem CIDRs.
- Connection (Azure)
- The Azure object that binds the two gateways with the PSK and IKE settings — this is the tunnel.
- DH group
- Diffie-Hellman group — the key-exchange strength. Azure Default = Group 2; recommended = Group 14 or higher.
- PFS
- Perfect Forward Secrecy — a fresh DH exchange per Phase 2 rekey. Must match on both ends or the tunnel drops.
- DPD
- Dead Peer Detection — keepalives that spot a dead tunnel. Azure's default timeout is 45 seconds.
- NAT-T
- NAT Traversal — wraps IKE/ESP in UDP 4500 so the tunnel works when a peer sits behind NAT.
- MSS clamping
- Lowering TCP's max segment size (~1350) so packets fit the tunnel without fragmenting.
- tunnel.1
- The logical Palo Alto interface that terminates the tunnel; routes point traffic into it.
📚 Sources
- Microsoft Learn — About VPN devices and IPsec/IKE parameters for site-to-site VPN gateway connections (default RouteBased policy, DH Group 2, P2 SA 27,000s). learn.microsoft.com/azure/vpn-gateway/vpn-gateway-about-vpn-devices
- Microsoft Learn — About cryptographic requirements and Azure VPN gateways (Custom IPsec/IKE policy matrix, DPD 45s, IKE Main-Mode SA 28,800s). learn.microsoft.com/azure/vpn-gateway/vpn-gateway-about-compliance-crypto
- Microsoft Learn — About VPN Gateway configuration settings (route-based vs policy-based, SKU/IKE table, GatewaySubnet /27). learn.microsoft.com/azure/vpn-gateway/vpn-gateway-about-vpn-gateway-settings
- Microsoft Learn — Tutorial: Create a site-to-site VPN connection in the Azure portal (Local network gateway + Connection blade fields). learn.microsoft.com/azure/vpn-gateway/tutorial-site-to-site-portal
- Palo Alto Networks — Set Up an IKE Gateway + Set Up an IPSec Tunnel (General/Advanced tab fields, Proxy IDs). docs.paloaltonetworks.com/network-security/ipsec-vpn
- Palo Alto Networks — Define IKE Crypto Profiles & Define IPSec Crypto Profiles (PAN-OS 11.0; key-lifetime defaults). docs.paloaltonetworks.com/pan-os/11-0/pan-os-admin/vpns
- Palo Alto Networks KB — How to Configure IPSec VPN to Azure (the vendor PAN ↔ Azure walkthrough Microsoft links). knowledgebase.paloaltonetworks.com
- Palo Alto LIVEcommunity — Site-to-site VPN IPsec issue between PA and Azure + VPN drops after 1 minute: ike-nego-p2-proxy-id-bad (real proxy-ID failures). live.paloaltonetworks.com
- Microsoft Q&A + Learn — IPsec tunnel from on-prem Palo Alto to Azure VPN Gateway (tunnel-up-no-traffic) and the AZ-700 study guide (site-to-site VPN objective). learn.microsoft.com/credentials/certifications/resources/study-guides/az-700
What's next?
You can build the tunnel — now make the routes smart. A single static route is fine for one VNet, but production hybrid networks run BGP so new Azure subnets show up automatically. Next we make routing dynamic on the Palo Alto.