{"id":21,"date":"2022-03-16T10:45:37","date_gmt":"2022-03-16T15:45:37","guid":{"rendered":"https:\/\/34.82.124.6\/?p=21"},"modified":"2022-04-30T09:47:56","modified_gmt":"2022-04-30T14:47:56","slug":"bootstrap-palo-alto-with-aviatrix-firenet-with-aws-gwlb-enabled","status":"publish","type":"post","link":"https:\/\/cloudlearning365.com\/?p=21","title":{"rendered":"Bootstrap Palo Alto with Aviatrix FireNet with AWS GWLB enabled"},"content":{"rendered":"\n<p>Recently I\u2019ve come to figure out how to bootstrap Palo Alto firewall while integrated with AWS GWLB and Aviatrix FireNet, here are my learning journal for future references:<\/p>\n\n\n\n<p>Validated environment:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Aviatrix Controller version: UserConnect-6.6.5404<\/li><li>Palo Alto Networks VM-Series Next-Generation Firewall (BYOL) 10.1.3<\/li><\/ul>\n\n\n\n<p>I\u2019ve used following Terraform code to create an Aviatrix FireNet egress only transit<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>module \"transit_firenet_egress\" {\n  source  = \"terraform-aviatrix-modules\/aws-transit-firenet\/aviatrix\"\n  version = \"5.0.0\"\n  name = \"egress\"\n  cidr           = \"10.1.0.0\/20\"\n  region         = var.region\n  account        = var.account\n  firewall_image = \"Palo Alto Networks VM-Series Next-Generation Firewall (BYOL)\"\n  inspection_enabled = false\n  egress_enabled = true\n  enable_egress_transit_firenet = true\n  single_az_ha = false\n  use_gwlb = true\n  firewall_image_version = \"10.1.3\"\n}<\/code><\/pre>\n\n\n\n<p>Then followed steps in this article:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/docs.aviatrix.com\/HowTos\/transit_firenet_workflow_aws_gwlb.html?highlight=gwlb#palo-alto-network-pan\n<\/div><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Step 3 can be skipped, as no need to active license<\/li><li>Step 4 can be skipped, as Firewall is configured as one-armed mode, there\u2019s no WAN port<\/li><li>Step 6 can be skipped, as again Firewall is one-armed mode, there\u2019s no need for route table changes<\/li><\/ul>\n\n\n\n<p>After the configuration and confirmed Firewall worked as expected. I\u2019ve saved the configuration as&nbsp;<strong>bootstrap.xml<\/strong><\/p>\n\n\n\n<p>Then I\u2019ve followed this article:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/docs.aviatrix.com\/HowTos\/bootstrap_example.html\n<\/div><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Created S3 bucket<\/li><li>Created IAM Role&nbsp;<strong>bootstrap-VM-S3-role<\/strong>&nbsp;and Policy&nbsp;<strong>bootstrap-VM-S3-policy<\/strong><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": &#091;\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": &#091;\n                \"s3:ListBucket\"\n            ],\n            \"Resource\": &#091;\n                \"arn:aws:s3:::*\"\n            ]\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": &#091;\n                \"s3:GetObject\"\n            ],\n            \"Resource\": &#091;\n                \"arn:aws:s3:::*\"\n            ]\n        }\n    ]\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Create following folder structure in S3 bucket<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>bootstrap-bucket\/\n  config\/\n    init-cfg.txt\n    bootstrap.xml\n  content\/\n  license\/\n  software\/<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Uploaded bootstrap.xml and&nbsp;<a href=\"https:\/\/docs.aviatrix.com\/_downloads\/init-cfg.txt\">init-cfg.txt<\/a><\/li><li>Modified Terraform code, so it looks like<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>module \"transit_firenet_egress\" {\n  source  = \"terraform-aviatrix-modules\/aws-transit-firenet\/aviatrix\"\n  version = \"5.0.0\"\n  name = \"egress\"\n  cidr           = \"10.1.0.0\/20\"\n  region         = var.region\n  account        = var.account\n  firewall_image = \"Palo Alto Networks VM-Series Next-Generation Firewall (BYOL)\"\n  inspection_enabled = false\n  egress_enabled = true\n  enable_egress_transit_firenet = true\n  single_az_ha = false\n  use_gwlb = true\n  firewall_image_version = \"10.1.3\"\n  bootstrap_bucket_name_1 = \"&lt;s3-buck-name&gt;\"\n  iam_role_1 = \"<strong>bootstrap-VM-S3-role<\/strong>\"\n}<\/code><\/pre>\n\n\n\n<p>Palo CLI command to check if bootstrap worked:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>show system bootstrap status<\/code><\/pre>\n\n\n\n<p>In my case, the bootstrap appeared to be working<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/03\/image-1024x182.png\" alt=\"\" class=\"wp-image-8\" \/><\/figure>\n\n\n\n<p>Additional command to troubleshoot bootstrap, or you can watch console session messages<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>debug logview component bts_details<\/code><\/pre>\n\n\n\n<p>However when tried to pass traffic through firewall, even when policy is wide open, package capture still shows traffic get dropped when sending from GWLB endpoints<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/03\/image-1-1024x56.png\" alt=\"\" class=\"wp-image-9\" \/><\/figure>\n\n\n\n<p>After comparing with a working manually configured firewall with an bootstrapped firewall, here\u2019s the observations:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>When&nbsp;<strong>bootstrap.xml<\/strong>&nbsp;loaded via bootstrap, and export the configuration right away, only<strong>&nbsp;public-key<\/strong>&nbsp;got modified, which makes sense as new firewall gets new ssh keys<\/li><li>I\u2019ve also learned that when there\u2019s a conflict setting between&nbsp;<strong>init-cfg.txt<\/strong>&nbsp;and&nbsp;<strong>bootstrap.xml<\/strong>,&nbsp;<a href=\"https:\/\/docs.paloaltonetworks.com\/vm-series\/10-0\/vm-series-deployment\/bootstrap-the-vm-series-firewall\/bootstrap-configuration-files.html\">the setting in&nbsp;<strong>init-cfg.txt<\/strong>&nbsp;wins<\/a>. Since we are not using Panorama at this point, all values of the&nbsp;<strong>init-cfg.txt<\/strong>&nbsp;should be just empty like this:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>type=\nip-address=\ndefault-gateway=\nnetmask=\nipv6-address=\nipv6-default-gateway=\nhostname=\nvm-auth-key=\npanorama-server=\npanorama-server-2=\ntplname=\ndgname=\ndns-primary=\ndns-secondary=\nop-command-modes=\ndhcp-send-hostname=\ndhcp-send-client-id=\ndhcp-accept-server-hostname=\ndhcp-accept-server-domain=<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>We also found out when using bootstrap with terraform, the GWLB isn\u2019t enabled, CLI command to check:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>show plugins vm_series aws gwlb<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/03\/image-2.png\" alt=\"\" class=\"wp-image-10\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>The management interface however has been swapped as expected<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/03\/image-3-1024x124.png\" alt=\"\" class=\"wp-image-11\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Since we do need to use GWLB to pass traffic to the firewall, tried following command:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>request plugins vm_series aws gwlb inspect enable yes<\/code><\/pre>\n\n\n\n<p>Now the GWLB is enabled, and traffic is passing!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/03\/image-4.png\" alt=\"\" class=\"wp-image-12\" \/><\/figure>\n\n\n\n<p>We modified&nbsp;<strong>init-cfg.txt<\/strong>&nbsp;to also enable GWLB during bootstrapping<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>type=\nip-address=\ndefault-gateway=\nnetmask=\nipv6-address=\nipv6-default-gateway=\nhostname=\nvm-auth-key=\npanorama-server=\npanorama-server-2=\ntplname=\ndgname=\ndns-primary=\ndns-secondary=\nop-command-modes=\ndhcp-send-hostname=\ndhcp-send-client-id=\ndhcp-accept-server-hostname=\ndhcp-accept-server-domain=\n<strong>plugin-op-commands=aws-gwlb-inspect:enable<\/strong><\/code><\/pre>\n\n\n\n<p>Now everything is working as expected, reference:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/docs.paloaltonetworks.com\/vm-series\/10-1\/vm-series-deployment\/set-up-the-vm-series-firewall-on-aws\/vm-series-integration-with-gateway-load-balancer\/integrate-the-vm-series-with-an-aws-gateway-load-balancer\/enabling-vm-series-integration-with-a-gwlb.html\n<\/div><\/figure>\n\n\n\n<p>Terraform code to create S3 bucket, role\/ policy and sample&nbsp;<strong>bootstrap.xml<\/strong>&nbsp;and&nbsp;<strong>init-cfg.txt<\/strong>:<br><a href=\"https:\/\/github.com\/jye-aviatrix\/terraform-aviatrix-aws-gwlb-palo-alto-10-bootstrap\">https:\/\/github.com\/jye-aviatrix\/terraform-aviatrix-aws-gwlb-palo-alto-10-bootstrap<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I\u2019ve come to figure out how to bootstrap Palo Alto firewall while integrated with AWS GWLB and Aviatrix FireNet, here are my learning journal for future references: Validated environment: Aviatrix Controller version: UserConnect-6.6.5404 Palo Alto Networks VM-Series Next-Generation Firewall &hellip; <a href=\"https:\/\/cloudlearning365.com\/?p=21\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2,3,7,8],"tags":[],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-aviatrix","category-aws","category-palo_alto","category-terraform"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21"}],"version-history":[{"count":1,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":22,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions\/22"}],"wp:attachment":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}