Skip to main content
TACUNS
Module 7 of 8
88% complete
Module 7

VPN Configuration

VPN Types Overview

VPN TypeProtocolUse CasePAN-OS Feature
Site-to-SiteIPSec (IKEv1/v2)Branch office to HQ connectivityIPSec tunnel with IKE
Remote Access (SSL VPN)SSL/TLSRemote users connecting to corporate networkGlobalProtect
LSVPNIPSecLarge-scale hub-and-spoke (100s of branches)GlobalProtect LSVPN
SD-WAN VPNIPSecMulti-path WAN with dynamic path selectionPAN-OS SD-WAN

IPSec VPN — IKE Phase 1

IKE (Internet Key Exchange) Phase 1 establishes a secure, authenticated channel between two VPN peers before any data tunneling begins. Think of it as the peers authenticating each other and agreeing on encryption parameters.

IKE Phase 1 — Mode

ModeExchangesSecurityUse Case
Main Mode6 messagesHides identities — more secureStandard site-to-site VPN with static IPs
Aggressive Mode3 messagesIdentities exposed — fasterDynamic IP peers (legacy use)

Phase 1 Parameters (IKE Crypto Profile)

  • DH Group — Diffie-Hellman key exchange group; higher group = stronger key. Recommended: Group 19 (256-bit ECDH) or Group 20
  • Encryption algorithm — AES-256-CBC or AES-256-GCM recommended; avoid DES and 3DES
  • Authentication (hash) — SHA-384 or SHA-512 recommended; avoid MD5
  • Lifetime — how long the Phase 1 SA is valid before rekeying (default: 28800 seconds / 8 hours)
  • Authentication method — Pre-Shared Key (PSK) for simplicity, or RSA/ECDSA certificates for enterprise deployments

IPSec VPN — IKE Phase 2

IKE Phase 2 (Quick Mode) negotiates the actual IPSec Security Association (SA) that protects the data traffic. It runs inside the secure channel established by Phase 1.

Phase 2 Parameters (IPSec Crypto Profile)

  • Protocol — ESP (Encapsulating Security Payload) for encryption + authentication; AH for authentication only (rarely used today)
  • Encryption — AES-256-GCM recommended (provides both encryption and authentication in one pass)
  • Authentication — SHA-256 or higher when using ESP without GCM mode
  • DH Group — optional PFS (Perfect Forward Secrecy); if enabled, use Group 19 or 20
  • Lifetime — Phase 2 SA duration (default: 3600 seconds / 1 hour)

PFS — Perfect Forward Secrecy

PFS ensures that if the long-term IKE key is compromised, historical VPN sessions cannot be decrypted. Each Phase 2 negotiation generates a new independent key using Diffie-Hellman. Enable PFS on all sensitive site-to-site tunnels.

Site-to-Site VPN Configuration Steps

Configuring a site-to-site IPSec VPN on PAN-OS requires several objects to be created in the correct order:

1. IKE Crypto Profile — define Phase 1 encryption, authentication, DH group, and lifetime under Network → IKE Crypto.

2. IPSec Crypto Profile — define Phase 2 protocol, encryption, and lifetime under Network → IPSec Crypto.

3. IKE Gateway — define peer IP, local interface, authentication (PSK or certificate), and reference the IKE Crypto Profile under Network → IKE Gateways.

4. IPSec Tunnel — define the tunnel, reference the IKE Gateway and IPSec Crypto Profile under Network → IPSec Tunnels.

5. Tunnel Interface — create a virtual tunnel interface (tunnel.1, tunnel.2) and assign it to a security zone (usually a dedicated VPN zone).

6. Routing — add a static route (or configure BGP/OSPF over the tunnel) pointing the remote subnet through the tunnel interface.

7. Security Policy — create rules allowing traffic between the local zone and the VPN zone in both directions.

GlobalProtect — SSL VPN

GlobalProtect is Palo Alto Networks' remote access VPN solution. It provides a secure SSL VPN tunnel for remote employees connecting from outside the corporate network. Unlike traditional SSL VPN portals, GlobalProtect uses a persistent agent that automatically connects when the user is off-network.

GlobalProtect Components

ComponentRoleWhere It Runs
GlobalProtect PortalInitial connection point; distributes configuration to agentsPAN-OS firewall (any L3 interface)
GlobalProtect GatewayTerminates the VPN tunnel; enforces security policyPAN-OS firewall (can be same or different from Portal)
GlobalProtect AppClient software installed on endpointsWindows, macOS, iOS, Android, Linux, ChromeOS

Authentication Options

  • LDAP / Active Directory — username + password against corporate directory
  • RADIUS — flexible authentication with NPS, Cisco ISE, or other RADIUS servers
  • SAML 2.0 — federated authentication with IdP (Okta, Azure AD, Ping)
  • MFA — second factor via RADIUS challenge, SAML MFA, or Duo integration
  • Client certificates — machine or user certificates for pre-logon authentication

Split Tunneling vs Full Tunneling

ModeWhat Goes Through VPNProsCons
Full TunnelAll traffic including internetFull visibility and control; internet traffic inspected by corporate NGFWHigher latency for internet; increased gateway load
Split TunnelOnly corporate network trafficBetter performance; lower gateway loadInternet traffic bypasses corporate controls; blind spot for threats
Inverse Split TunnelEverything except specified exclusionsBalance of control with performance optimizationComplex configuration; requires regular exclusion list maintenance

Security Recommendation

Full tunneling provides the most security but can degrade user experience for bandwidth-intensive applications. A practical compromise: use split tunneling with DNS forced through the VPN. All DNS queries go through corporate DNS, preserving DNS Security filtering while reducing bandwidth through the VPN gateway.

VPN Troubleshooting Commands

pan-os-cli
# Show IKE Phase 1 status
show vpn ike-sa

# Show IPSec Phase 2 status
show vpn ipsec-sa

# Initiate IKE Phase 1 negotiation (trigger tunnel)
test vpn ike-sa gateway <gateway-name>

# Show detailed IKE SA information
show vpn ike-sa gateway <gateway-name> detail

# Show flow information for tunnel traffic
show vpn flow name <tunnel-name>

# Show IKE Phase 2 summary
show vpn ipsec-sa tunnel <tunnel-name>

# Debug IKE (generates detailed logs — use carefully)
debug ike global on debug

# View IKE debug logs
less mp-log ikemgr.log

# Restart IKE daemon (clears all tunnels — use in maintenance window)
debug software restart process ike-daemon

LSVPN — Large Scale VPN

LSVPN (Large Scale VPN) is a GlobalProtect feature designed for hub-and- spoke deployments with hundreds or thousands of branch firewall devices. Instead of manually configuring individual IKE gateways for each branch, LSVPN uses a satellite and hub model where branch devices (satellites) automatically register to the hub and receive their VPN configuration.

  • Satellites register to the GlobalProtect Portal using certificates
  • Hub firewalls terminate all satellite tunnels
  • Routing updates are distributed automatically via BGP or OSPF over the tunnels
  • New branches can be added without manual hub configuration — zero-touch provisioning
  • Suitable for retail chains, government branch offices, and large distributed enterprises