This tutorial shows how to perform cross-region failover by connecting VM-Series as a router appliance to a Network Connectivity Center (NCC) hub.
Beyond cross-region failover, using the VM-Series as a router appliance with NCC supports other use cases, including:
- Connecting remote networks to Google Cloud while providing full BGP route exchange.
- Creating a global WAN network secured with VM-Series deployed in Google Cloud.
- Facilitating disaster recovery network operations with regionally distributed VM-Series.
This tutorial is intended for network administrators, solution architects, and security professionals who are familiar with Compute Engine and Virtual Private Cloud (VPC) networking.
Below is a diagram of the tutorial.
- 3 x VPCs are created (
mgmt
,untrust
, &vpc1
), each containing a subnets inus-east1
&us-west1
. - 1 x VM-Series is created in each region (
us-east1-vmseries
&us-west1-vmseries
) with a NIC in each VPC. - The firewall's NIC in
vpc1
is connected as a router appliance to a NCC hub. - In each region, the firewalls are BGP neighbors with Cloud Routers enabling end-to-end route propagation.
- In the event of a regional failure, egress traffic from the affected region in
vpc1
is automatically rerouted to the firewall in the healthy region through dynamic route propagation.
The following is required for this tutorial:
- A Google Cloud project.
- A machine with Terraform version:
" ">= 0.15.3, < 2.0""
Note
This tutorial assumes you are using Google Cloud Shell.
-
Enable the required APIs and clone the repository.
gcloud services enable compute.googleapis.com git clone https://github.com/PaloAltoNetworks/google-cloud-vmseries-ncc-tutorial cd google-cloud-vmseries-ncc-tutorial
-
Generate an SSH key.
ssh-keygen -f ~/.ssh/vmseries-tutorial -t rsa
-
Create a
terraform.tfvars
file.cp terraform.tfvars.example terraform.tfvars
-
Edit the
terraform.tfvars
file and set values for the following variables:Key Value project_id
The Project ID within Google Cloud. public_key_path
The local path of the public key you previously created mgmt_allow_ips
A list of IPv4 addresses which require access to the VM-Series MGT NIC. vmseries_image_name
The VM-Series image to deploy.
Tip
For vmseries_image_name
, a full list of public images can be found using gcloud
:
gcloud compute images list --project paloaltonetworksgcp-public --filter='name ~ .*vmseries-flex.*'
Note
If you are using BYOL image (i.e. vmseries-flex-byol-*
), the license can be applied during or after deployment. To license during deployment, add your VM-Series Authcodes to bootstrap_files/authcodes
.
See VM-Series Bootstrap Methods for more information.
When no further changes are necessary in the configuration, deploy the resources.
-
Initialize and apply the Terraform plan.
terraform init terraform apply
Enter
yes
to create the resources. -
After all the resources are created, Terraform displays the following message:
Apply complete! Outputs: SSH_VMSERIES_REGION1 = "ssh admin@<EXTERNAL_IP> -i ~/.ssh/vmseries-tutorial" SSH_VMSERIES_REGION2 = "ssh admin@<EXTERNAL_IP> -i ~/.ssh/vmseries-tutorial" SSH_VM_REGION1 = "gcloud compute ssh paloalto@us-central1-vm --zone=us-central1-a" SSH_VM_REGION2 = "gcloud compute ssh paloalto@us-east4-vm --zone=us-east4-a"
Caution
It may take an additional 10 minutes for the firewalls to become fully available.
To access the VM-Series user interface, a password must be set for the admin
user on each firewall.
-
Use the
SSH_VMSERIES_REGION1
output to SSH to the mgmt NIC onus-east1-vmseries
. -
On the VM-Series, set a password for the
admin
username.configure set mgt-config users admin password
-
Commit the changes.
commit
-
Enter
exit
twice to terminate the session. -
Log in to the VM-Series web interface using the username
admin
and your password.https://<EXTERNAL_IP>
-
Repeat the process for
us-west1-vmseries
by using theSSH_VMSERIES_REGION2
output.
Confirm BGP has been established between the VM-Series & Cloud Routers in each region. Then, verify routes are exchanged between the peers.
Note
The Terraform plan creates the Cloud Routers for each region within vpc1
. It also bootstraps the VM-Series with a configuration to automatically establish BGP with the cloud routers.
-
On each VM-Series, go to Network β Virtual Routers.
-
Next to
gcp-vr
, select More Runtime Stats.π‘ Information
The virtual router contains all of routing configurations on the VM-Series. To view the BGP configuration, opengcp-vr
and select the BGP tab.
-
Click BGP β Peer to view the status of the BGP peering sessions with each region's cloud router.
π‘ Information
Both connections should be listed asEstablished
.
-
Click Local RIB to view the routing information the firewall has learned and selected for use.
π‘ Information
Routes with the*
flag are preferred routes.
-
Click RIB Out to view the routes exported by the VM-Series to the Cloud Routers.
π‘ Information
A default route is exported for each Cloud Router's peering interface.
-
In Google Cloud, go to Network Connectivity β Network Connectivity Center.
-
Click Spokes and select the
vmseries-us-east1-spoke
router appliance. -
Within each spoke, open
peer0
&peer1
to view the peering status along with any advertised routes.π‘ Information
The Cloud Router in each region automatically propagates subnet routes to the VM-Series firewalls. -
Repeat the process for the
vmseries-us-west1-spoke
router appliance.
-
In Google Cloud, go to VPC Network β Routes β Effective Routes.
π‘ Information
This window shows the effective routes for a given VPC, including the propagated routeds. propagated by the VM-Series and Cloud Routers.
-
Set VPC to
vpc1
& Region tous-west1
to view the effective routes forus-east1
traffic.π‘ Information
The preferred default route (priority0
) forus-east1
uses theus-east1-vmseries
as the next hop.
-
Set Region to
us-west1
to view the effective routes forus-west1
traffic.π‘ Information
The preferred default route (priority0
) forus-west1
uses theus-west1-vmseries
as the next hop.
Access the workload VMs in each region to initiate egress internet traffic. Then, verify traffic sourced from us-east1
travereses the us-east1-vmseries
and traffic sourced from us-west1
traverses the us-west1-vmseries
.
Note
You can redisplay the Terraform output values at anytime by running terraform output
from the google-cloud-vmseries-ncc-tutorial
directory.
-
In Cloud Shell, open two additional tabs β.
-
In the 1st tab, paste the
SSH_VM_REGION1
output to SSH tous-east1-vm
(10.1.0.5
). -
In the 2nd tab, paste the
SSH_VM_REGION2
output to SSH tous-west1-vm
(10.1.0.21
). -
On each VM, run a continuous ping to an internet address.
ping 4.2.2.2
Keep the pings running.
-
On each VM-Series, go to Monitor β Traffic and enter the following traffic filter.
( zone.src eq 'vpc1' ) and ( addr.dst in '4.2.2.2' )
π‘ Information
You should see traffic fromus-east1-vm
(10.1.0.5
) uses the preferred route tous-east1-vmseries
& traffic fromus-west1-vm
(10.1.0.21
) uses the preferred route tous-west1-vmseries
.
Simulate a regional failure event for us-east1
by terminating the BGP connectivity on the us-east1-vmseries
. After failover, the dynamic routes using us-east1-vmseries
will coverge to use to us-west1-vmseries
.
-
On
us-east1-vmseries
, go to Network β Virtual Routers and selectgcp-vr
. -
Click BGP β uncheck Enable β click OK.
-
In the top-right corner, click Commit β Commit to apply the changes.
-
Wait for the commit to complete.
-
In Google Cloud, go to VPC Network β Routes β Effective Routes.
-
Set Network to
vpc1
and Region tous-east1
.π‘ Information
The default route forus-east1
traffic should useus-west1-vmseries
as the next hop.
-
On
us-west1-vmseries
, go to Monitor β Traffic.π‘ Information
Pings fromus-east1-vm
(10.1.0.5
) should now appear within theus-west1-vmseries
traffic logs indicating a successful failover.
Important
In production environments, it is recommended to have multiple firewalls deployed across different zones in each region. This approach offers higher redundancy for intra-region failure events.
Delete all the resources when you no longer need them.
-
In Cloud Shell,change directories to the Terraform build.
cd google-cloud-vmseries-ncc-tutorial
-
run the following to delete all the created resources.
terraform destroy
Enter
yes
to delete all resources created by the Terraform plan. -
After all the resources are deleted, Terraform displays the following message:
Destroy complete!
- Learn about the VM-Series on Google Cloud.
- Getting started with Palo Alto Networks PAN-OS.
- Read about securing Google Cloud Networks with the VM-Series.
- Learn about VM-Series licensing on all platforms.
- Use the VM-Series Terraform modules for Google Cloud.