CloudVPNGuide UsingCloudVPNwithPaloAltoNetworksPA 3020
CloudVPNGuide UsingCloudVPNwithPaloAltoNetworksPA 3020
Palo Alto Networks®, PAN-OS®, and other Palo Alto Networks marks are trademarks of Palo Alto Networks, Inc.
1
Contents
Contents
Introduction
Environment Overview
Topology
Configuration
Overview
Getting Started
IPsec Parameters
Policy Based IPsec VPN Setup
Create and Configure GCP VPN
Configuration - GCP CLI
Create the VPN Gateway
Configuration - Palo Alto Network GUI
Configuration - Palo Alto Network CLI Policy Based Connection
Configuration - Palo Alto Network CLI BGP
Outline
1. Requirements
2. Setup Diagram
3. GCP Setup
3.1 GCP VPN Setup
3.1 GCP Cloud Router Setup
4. PAN Setup
4.1 Access
4.2 Public IP setup
4.3 Tunnel Interface setup
4.4 IKE Profile
4.5 IPSec Profile
4.6 IKE Gateway
4.7 IPSec Tunnel
4.8 BGP setup
Page 2
Introduction
This guide walks you through the process of configuring the Palo Alto Networks PAN-3020 for
integration with the Google Cloud VPN service. This information is provided as an example
only. Please note that this guide is not meant to be a comprehensive overview of IPSec and
assumes basic familiarity with the IPSec protocol.
Environment overview
The equipment used in the creation of this guide is as follows:
Topology
This guide describes two Cloud VPN connection topologies:
1. A site-to-site policy based IPsec VPN tunnel configuration using static routing.
Page 3
2. A site-to-site IPsec VPN tunnel configuration using the Google Cloud Router and BGP, also
known as dynamic routing.
Configuration
Overview
The configuration samples that follow include numerous value substitutions provided as
examples only. When following this guide, replace any references to IP addresses, device IDs,
shared secrets or keys, account information, or project names with the appropriate values for
your environment. Values unique to your environment are highlighted in bold.
This guide is not meant to be a comprehensive overview of the setup for the referenced device,
but is only intended to assist in the creation of IPSec connectivity to Google Compute Engine.
The following is a high level overview of the configuration process:
Page 4
Getting started
The first step in configuring your Palo Alto Networks PA-3020 for use with the Google Cloud
VPN service is to ensure that your device meets the following prerequisite conditions:
● Your Palo Alto Networks PA-3020 is online and functional with no faults detected
● You have root access to the Palo Alto Networks PA-3020
● There is at least one configured and verified functional internal interface
● There is one configured and verified functional external interface
IPsec parameters
Use the following values for the IPSec configuration of your PAN-3020.
Parameter Value
Start auto
Page 5
INITIAL_CONTACT on
(uniqueids)
Integrity sha-256
prf sha1-96
Integrity sha-256
Page 6
Policy based IPsec VPN setup
This page includes all parameters needed to create a new VPN connection. See the following
example for a detailed description of each provided parameter.
Page 7
Page 8
The following parameters are required for the Cloud VPN gateway:
● Name: The name of the Cloud VPN gateway.
● Description: A brief description of the VPN connection.
● Network: the Virtual Private Cloud (VPC) network that the Cloud VPN gateway will
attach to. Note: This is the VPC network to which VPN connectivity will be made
available.
● Region: The home region of the Cloud VPN gateway. Note: The Cloud VPN gateway
must be in the same region as the subnetworks it is connecting.
● IP address: The static public IP address that will be used by the Cloud VPN gateway.
You can assign an existing, unused, static public IP address within the project, or you
can create a new one.
The following parameters are required for each tunnel that is managed by the Cloud VPN
gateway:
● Remote peer IP address: The public IP address of the on-premises VPN appliance that
will connect to Cloud VPN.
● IKE version: The IKE protocol version. This guide assumes IKEv2.
● Shared secret: A shared secret used for mutual authentication by the VPN gateways.
Configure the on-premises VPN gateway tunnel using the same shared secret as for the
Cloud VPN tunnel..
● Routing options: Cloud VPN supports multiple routing options for the exchange of route
information between the VPN gateways. This example uses static routing. Dynamic
routing using Cloud Router and BGP are described in this Fortinet guide.
● Remote network IP ranges: The on-premises CIDR blocks being connected to Google
Cloud through the Cloud VPN gateway.
● Local subnetworks: the Google Cloud CIDR blocks being connected to on-premises
through the Cloud VPN gateway.
● Local IP ranges: the VPC IP ranges matching the selected subnet.
If the PAN3020 is not set up for VPN tunneling, then you see a “Remote peer IP Address”
warning in the VPN dashboard screen. We will configure the PAN3020 in subsequent steps
that remove this warning if the setup is successful.
Page 9
Configuration - gcloud CLI
Cloud VPN can also be configured using the gcloud command-line tool. Command line
configuration requires two steps. First you must create the Cloud VPN Gateway, then you must
create the tunnels that refer to the Cloud VPN Gateway.
A VPN tunnel is established after you complete the following steps in the PA-3020 user
interface (UI):
Page 10
1. Create an Interface Management profile to allow pings
Select Add and give the interface a name (for example, allow_ping) and select the
checkbox called ping. Click OK.
Page 11
2. Establish an Ethernet Interface with an externally accessible IP
Page 12
3. Create a Tunnel Interface
Page 13
4. Create an IKE profile (Phase 1)
Configure a new IKE Crypto profile (in the example, this profile is named default) using the
parameters in the above screenshot. It is critically important that these parameters match the
configuration on the Cloud VPN side of the tunnel.
Page 14
5. Create an IPSec profile (Phase 2)
Configure a new IKE IPSec profile (in the example, this profile is named default) using the
parameters in the preceding screenshot. It is critically important that these parameters match
the configuration on the Cloud VPN side of the tunnel.
Page 15
6. Configure the IKE Gateway
1. The Interface field is set to the Ethernet interface that you configured in Step 2.
2. The Local IP Address is the IP address that you assigned to that interface.
3. The Peer IP Address is the IP address of the VPC network.
4. The Pre-shared key is the same key that you configured in the Cloud VPN profile.
5. Set Local Identification to the IP address of the ethernet1/1 device.
6. Set Peer Identification to the IP address of the peer on the other side of the tunnel.
Page 16
7. Configure a Virtual Router and set a default route
Page 17
8. Establish an IPSec Tunnel with a proxy ID
Page 18
3. The Remote IP address is the address range of the traffic sent from Google Cloud.
For example:
admin@PA-3020> ping source <ip address of PAN> host <ip address of
Cloud VPN>
Page 19
Configuration - Palo Alto Network CLI–policy based connection
2. Enable ping
admin@PA-3020# set network interface ethernet ethernet1/1 layer3
interface-management-profile allow_ping
4. Create an IKE profile (Phase 1) (use any name, default is used in this example)
admin@PA-3020# set network ike crypto-profiles ike-crypto-profiles default
dh-group group14
admin@PA-3020# set network ike crypto-profiles ike-crypto-profiles default
encryption aes-256-cbc
admin@PA-3020# set network ike crypto-profiles ike-crypto-profiles default hash
sha256
admin@PA-3020# set network ike crypto-profiles ike-crypto-profiles default
lifetime hours 10
5. Create an IPSec profile (Phase 2) (use any name, default is used in this example)
admin@PA-3020# set network ike crypto-profiles ipsec-crypto-profiles default
dh-group group14
admin@PA-3020# set network ike crypto-profiles ipsec-crypto-profiles default
esp encryption aes-256-cbc
admin@PA-3020# set network ike crypto-profiles ipsec-crypto-profiles default
esp authentication sha256
admin@PA-3020# set network ike crypto-profiles ipsec-crypto-profiles default
lifetime hours 3
6. Configure IKE Gateway (use any name, gcp-ike is used in this example)
admin@PA-3020# set cp-ike protocol ikev2
network ike gateway g
ike-crypto-profile default
admin@PA-3020# set network ike gateway g cp-ike protocol ikev2 exchange-mode
auto
admin@PA-3020# set cp-ike protocol ikev2 dpd enable yes
network ike gateway g
admin@PA-3020# set network ike gateway g cp-ike authentication pre-shared-key
key <omitted>
admin@PA-3020# set network ike gateway gcp-ike local-address interface
ethernet1/1
Page 20
admin@PA-3020# set network ike gateway gcp-ike peer-address ip 146.148.76.46
admin@PA-3020# set network ike gateway gcp-ike local-id type ipaddr
admin@PA-3020# set network ike gateway gcp-ike local-id id 209.119.81.226
admin@PA-3020# set network ike gateway gcp-ike peer-id type ipaddr
admin@PA-3020# set network ike gateway gcp-ike peer-id id 146.148.76.46
7. Configure Virtual Router and set a default route (use any name, “default” was used in this
example)
admin@PA-3020# set network virtual-router default interface ethernet1/1
admin@PA-3020# set network virtual-router d efault interface t
unnel.1
8. Establish IPSec Tunnel with Proxy ID (use any name, “to-gcp” was used in this example)
admin@PA-3020# set network tunnel ipsec to-gcp auto-key ike-gateway gcp-ike
admin@PA-3020# set network tunnel ipsec to-gcp auto-key ipsec-crypto-profile
default
admin@PA-3020# set network tunnel ipsec to-gcp tunnel-monitor enable no
admin@PA-3020# set network tunnel ipsec to-gcp tunnel-interface tunnel.1
admin@PA-3020# set network tunnel ipsec to-gcp auto-key proxy-id
gcp-tunnel-policy local 10.244.135.0/26
set network tunnel ipsec to-gcp auto-key proxy-id gcp-tunnel-policy remote
10.240.0.0/16
Page 21
Configuration - Palo Alto Network CLI BGP
Outline
1. Requirements
2. Setup diagram
3. GCP setup
3.1. GCP Cloud VPN and Cloud Router setup
4. PAN Setup
4.1. Access
4.2. Public IP setup
4.3. Tunnel Interface setup
4.4. IKE profile setup
4.5. IPSec profile setup
4.6. IKE gateway Setup
4.7. IPSec tunnel setup
4.8. BGP setup
1. Requirements
This section describes steps to set up BGP interoperability between Cloud VPN and the Palo
Alto Networks (PAN-3020) router on your premises.
Note: All IP Addresses used in the following sections are examples only.
2. Setup diagram
Page 22
3. GCP setup
Create a project in the GCP Cloud Console.
To complete the set up for Cloud VPN and Cloud Router, follow these steps for setting up a
Classic VPN using dynamic routing.
4. PAN setup
This section describes how to configure the PAN device for BGP. Each section provides
example commands or command output.
4.1 Access
Log into the PAN console.
Console:
$ ssh -o PubKeyAuthentication=no -l cloud:7002 100.107.160.100
cloud:[email protected]'s password:<password>
******
You are now connected to the target.
******
Page 23
admin@PA-3020# show network virtual-router default routing-table ip
static-route default-route
default-route {
nexthop {
ip-address 209.119.81.230;
}
metric 10;
destination 0.0.0.0/0;
}
4. Set up a L3-Trust zone for this interface from the GUI (The CLI command is not
documented here).
5. Create a management profile allowing ping on this interface (The CLI command is not
documented here).
6. From another device, ping this device on its Public IP address.
1. Set up a tunnel interface. This is the BGP endpoint on the PAN device.
Page 24
4.4 IKE profile
Page 25
retry 5;
}
ike-crypto-profile default;
exchange-mode auto;
}
}
authentication {
pre-shared-key {
key -AQ==0YqslrkFtLPIOYkbepHJQUFJUUw=kvL7m4bbTOvtUbnT5xXZKg==;
}
}
protocol-common {
nat-traversal {
enable no;
}
passive-mode no;
}
local-address {
ip 209.119.81.226/29;
interface ethernet1/1;
}
peer-address {
ip 146.148.76.46;
}
}
}
Page 26
remote 0.0.0.0/0;
}
}
}
tunnel-monitor {
enable no;
}
anti-replay no;
copy-tos no;
tunnel-interface tunnel.1;
}
}
global-protect-gateway;
}
Page 27
}
}
}
}
}
}
Page 28