Palo Alto Networks Knowledgebase: How to Configure IPSec VPN

How to Configure IPSec VPN

129856
Created On 12/04/19 23:54 PM - Last Updated 12/04/19 23:55 PM
Crypto Profile IKE IPSec Virtual Router Virtual Systems VPNs
Environment

This document describes the steps to configure IPSec VPN and assumes the Palo Alto Networks firewall.

Topology


basic-vpn-topology



Resolution

NOTE: The Palo Alto Networks supports only tunnel mode for IPSec VPN. The transport mode is not supported for IPSec VPN.

Step 1

  Go to Network >Interface > Tunnel tab,  click Add to create a new tunnel interface and assign the following parameters:
– Name: tunnel.1
– Virtual router: (select the virtual router you would like your tunnel interface to reside)
– Security Zone:(configure a new zone for the tunnel interface for more granular control of traffic ingress/egressing the tunnel)

tunnel-interface

NOTE: If the tunnel interface is in a zone different from the zone where the traffic will originate or depart, then a policy is required to allow the traffic to flow from the source zone to the zone containing the tunnel interface.
Configuring ip-address on the tunnel interface is optional. You would need ip-address if you intend to run dynamic routing protocols over the tunnel interface.
 

Step 2

Go to Network > Network Profiles > IKE Crypto , click Add and define the IKE Crypto profile (IKEv1 Phase-1) parameters. Name does not matter, can be whatever you like.  These parameters should match on the remote firewall for the IKE Phase-1 negotiation to be successful.

p1-max-crypto

Step 3

Go to Network > Network Profiles > IKE Gateway to configure the IKE Phase-1 Gateway.
Version: There are options for the Version where you can select IKEv1 only mode, IKEv2 only mode or IKEv2 preferred mode.
Select the IKE version that the gateway supports and must agree to use with the peer gateway. IKEv2 preferred mode causes the gateway to negotiate for IKEv2, and if the peer also supports IKEv2, that is what they will use. Otherwise, the gateway falls back to IKEv1.
Interface: The external interface connected to the internet.
Local and Peer Identification: Defines the format and identification of the local/peer gateway, which are used with the pre-shared key for both IKEv1 phase 1 SA and IKEv2 SA establishment.
Choose one of the following types and enter the value: FQDN (hostname), IP address, KEYID (binary format ID string in HEX), or User FQDN (email address).
If you don’t specify a value, the gateway will use the local/peer IP address as the Local/Peer Identification value.

ike-gw-general

Advanced Options:
ike-gw-advanced

Enable Passive Mode - The firewall to be in responder only mode. The firewall will only respond to IKE connections and never initiate them.
Exchange Mode - The device can accept both main mode and aggressive mode negotiation requests; however, whenever possible, it initiates negotiation and allows exchanges in main mode

Step 4

Under Network > Network Profiles > IPSec Crypto , click Add to create a new Profile, define the IPSec Crypto profile to specify protocols and algorithms for identification, authentication, and encryption in VPN tunnels based on IPSec SA negotiation (IKEv1 Phase-2). These parameters should match on the remote firewall for the IKE Phase-2 negotiation to be successful.

ipsec-p2-crypto
 

Step 5

Under Network > IPSec Tunnels, click Add to create a new IPSec Tunnel. In the General window use the Tunnel Interface, the IKE Gateway and IPSec Crypto Profile from above to set up the parameters to establish IPSec VPN tunnels between firewalls.

User-added image

NOTE:  If the other side of the tunnel is a third-party VPN device  (non PAN-OS FW), then enter the local proxy ID and remote proxy ID to match, these will typically be the local and remote LAN subnets.

When configuring an IPSec Tunnel Proxy-ID configuration to identify local and remote IP networks for traffic that is NATed, the Proxy-ID configuration for the IPSec Tunnel must be configured with the Post-NAT IP network information, because the Proxy-ID information defines the networks that will be allowed through the tunnel on both sides for the IPSec configuration.

User-added image
 

Step 6

Under Network > Virtual Routers, click on your Virtual router profile, then click Static Routes, add a new route for the network that is behind the other VPN endpoint. Be sure to use the proper Tunnel Interface. Click OK when done.

User-added image
 

Step 7

Configure the required security rules/policies

Allow ike negotiation and ipsec/esp packets. By default the ike negotiation and ipsec/esp packets would be allowed via the intrazone default allow.
If you wish to have more granular control, you could specifically allow the required traffic and deny the rest.
User-added image

Allow incoming and outgoing traffic through the tunnel. If you require granular control of incoming and outgoing traffic, you may create separate rules for each direction.
User-added image


Step 8

Commit the configuration.
 

NOTE:
The tunnel comes up only when there is interesting traffic destined to the tunnel.
To manually initiate the tunnel, check the status and clear tunnels refer to:
How to check Status, Clear, Restore, and Monitor an IPSEC VPN Tunnel

See also

Additional documentation for more complex configurations with VPNs are:

IPSec and tunneling - resource list

How to Configure a Palo Alto Networks Firewall with Dual ISPs and Automatic VPN Failover

Selecting an IP Address to use for PBF or Tunnel Monitoring

Dead Peer Detection and Tunnel Monitoring

 

author: dtickoo

update: jdelio, reaper



Attachments
Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClGkCAK&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Attachments
Choose Language