{"id":2485,"date":"2022-10-19T20:24:22","date_gmt":"2022-10-19T17:24:22","guid":{"rendered":"https:\/\/artem.services\/?p=2464"},"modified":"2022-10-25T16:11:24","modified_gmt":"2022-10-25T13:11:24","slug":"2485","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=2485&lang=en","title":{"rendered":"Palo Alto VM-Series Firewall: Let&#8217;s Encrypt certificate"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2328\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/09\/palo-alto-logo.png\" alt=\"\" width=\"2560\" height=\"465\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/09\/palo-alto-logo.png 2560w, https:\/\/artem.services\/wp-content\/uploads\/2022\/09\/palo-alto-logo-300x54.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2022\/09\/palo-alto-logo-1024x186.png 1024w, https:\/\/artem.services\/wp-content\/uploads\/2022\/09\/palo-alto-logo-768x140.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2022\/09\/palo-alto-logo-1536x279.png 1536w, https:\/\/artem.services\/wp-content\/uploads\/2022\/09\/palo-alto-logo-2048x372.png 2048w, https:\/\/artem.services\/wp-content\/uploads\/2022\/09\/palo-alto-logo-954x173.png 954w, https:\/\/artem.services\/wp-content\/uploads\/2022\/09\/palo-alto-logo-1354x246.png 1354w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/p>\n<p>PAN-OS only allows you to generate self-signed certificates or already import existing ones. To use a Let&#8217;s Encrypt certificate, you need to request it on another device, and therefore we can only use DNS as validation.<\/p>\n<p>AWS Route53 is used as a DNS provider, we will use <a href=\"https:\/\/certbot.eff.org\/\" target=\"_blank\" rel=\"noopener\">Certbot<\/a> to obtain a certificate, we also need an installed and configured <a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/getting-started-install.html\" target=\"_blank\" rel=\"noopener\">awscli<\/a><\/p>\n<h4>Certificate request<\/h4>\n<p>Installing the necessary software (in this example, the macOS system was used):<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nbrew install certbot awscli\r\npip3 install certbot-dns-route53\r\n<\/pre>\n<p>Configure awscli:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nawscli configure\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Minimum permissions for DNS validation<\/p>\n<p><strong>AWS IAM Policy:<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n{\r\n  &quot;Version&quot;: &quot;2012-10-17&quot;,\r\n  &quot;Id&quot;: &quot;certbot-dns-route53&quot;,\r\n  &quot;Statement&quot;: [\r\n    {\r\n      &quot;Effect&quot;: &quot;Allow&quot;,\r\n      &quot;Action&quot;: [\r\n        &quot;route53:ListHostedZones&quot;,\r\n        &quot;route53:GetChange&quot;\r\n      ],\r\n      &quot;Resource&quot;: [\r\n        &quot;*&quot;\r\n      ]\r\n    },\r\n    {\r\n      &quot;Effect&quot;: &quot;Allow&quot;,\r\n      &quot;Action&quot;: [\r\n        &quot;route53:ChangeResourceRecordSets&quot;,\r\n        &quot;route53:ListResourceRecordSets&quot;\r\n      ],\r\n      &quot;Resource&quot;: [\r\n        &quot;arn:aws:route53:::hostedzone\/YOURDOMAINZONEID&quot;\r\n      ]\r\n    }\r\n  ]\r\n}\r\n<\/pre>\n<blockquote><p>Where &quot;<strong>YOURDOMAINZONEID<\/strong>&quot; &#8212; ID your hosted zone<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><!--more-->Requesting a certificate<\/p>\n<blockquote><p>Certbot on macOS requires root privileges<\/p><\/blockquote>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo certbot certonly \\\r\n  --register-unsafely-without-email \\\r\n  --dns-route53 \\\r\n  -d gp1.aws.artem.services\r\n<\/pre>\n<blockquote><p>Where &quot;<strong>gp1.aws.artem.services<\/strong>&quot; is the domain name for the requested certificate<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2465\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-20.01.05.png\" alt=\"\" width=\"2868\" height=\"866\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-20.01.05.png 2868w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-20.01.05-300x91.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-20.01.05-1024x309.png 1024w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-20.01.05-768x232.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-20.01.05-1536x464.png 1536w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-20.01.05-2048x618.png 2048w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-20.01.05-954x288.png 954w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-20.01.05-1354x409.png 1354w\" sizes=\"(max-width: 2868px) 100vw, 2868px\" \/><\/p>\n<p>Since we executed Certbot as root, we will copy the necessary files to the home directory and change the owner<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo cp \/etc\/letsencrypt\/live\/gp1.aws.artem.services\/{fullchain,privkey}.pem ~\/\r\nsudo chown artem:staff ~\/{fullchain,privkey}.pem\r\n<\/pre>\n<p>Now you can proceed to import the certificate<\/p>\n<h4>Firewall<\/h4>\n<p><strong>Management<\/strong><\/p>\n<p>To import a certificate, go to &quot;<strong>Device<\/strong>&quot; -&gt; &quot;<strong>Certificate Management<\/strong>&quot; -&gt; &quot;<strong>Certificates<\/strong>&quot; -&gt; &quot;<strong>Device Certificates<\/strong>&quot; and click &quot;<strong>Import<\/strong>&quot;<\/p>\n<ul>\n<li>Certificate File: <strong>fullchain.pem<\/strong><\/li>\n<li>Import Private Key: <span class=\"HwtZe\" lang=\"en\"><span class=\"jCAhz ChMk0b\"><span class=\"ryNqvb\">check the box<\/span><\/span><\/span><\/li>\n<li>Key File: <strong>privkey.pem<\/strong><\/li>\n<li>Passphrase: random password (will not be used anywhere else)<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2473\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.23.png\" alt=\"\" width=\"988\" height=\"730\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.23.png 988w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.23-300x222.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.23-768x567.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.23-954x705.png 954w\" sizes=\"(max-width: 988px) 100vw, 988px\" \/><\/p>\n<p>We check the status of the certificate and make sure that the &quot;<strong>Key<\/strong>&quot; field is checked.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2474\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.38.png\" alt=\"\" width=\"2464\" height=\"262\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.38.png 2464w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.38-300x32.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.38-1024x109.png 1024w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.38-768x82.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.38-1536x163.png 1536w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.38-2048x218.png 2048w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.38-954x101.png 954w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.24.38-1354x144.png 1354w\" sizes=\"(max-width: 2464px) 100vw, 2464px\" \/><\/p>\n<p>Next, we need to create a profile, for this we go to &quot;<strong>Device<\/strong>&quot; -&gt; &quot;<strong>Certificate Management<\/strong>&quot; -&gt; &quot;<strong>SSL\/TLS Service Profile<\/strong>&quot; and click &quot;<strong>Add<\/strong>&quot;. We select our imported certificate and specify the name and requirements for TLS versions.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2475\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.25.14.png\" alt=\"\" width=\"792\" height=\"484\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.25.14.png 792w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.25.14-300x183.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.25.14-768x469.png 768w\" sizes=\"(max-width: 792px) 100vw, 792px\" \/><\/p>\n<p>It remains to specify the profile for the management connection. Go to &quot;<strong>Device<\/strong>&quot; -&gt; &quot;<strong>Setup<\/strong>&quot; -&gt; &quot;<strong>Management Settings<\/strong>&quot; and click on the &quot;gear&quot;. Set a domain name and select an SSL\/TLS profile.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2476\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.30.04.png\" alt=\"\" width=\"946\" height=\"1162\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.30.04.png 946w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.30.04-244x300.png 244w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.30.04-834x1024.png 834w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.30.04-768x943.png 768w\" sizes=\"(max-width: 946px) 100vw, 946px\" \/><\/p>\n<p>And finally only left to apply and save the changes, for this, in the upper right corner, click on the &quot;<strong>Commit<\/strong>&quot; button<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2477\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.35.09.png\" alt=\"\" width=\"1190\" height=\"478\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.35.09.png 1190w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.35.09-300x121.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.35.09-1024x411.png 1024w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.35.09-768x308.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.35.09-954x383.png 954w\" sizes=\"(max-width: 1190px) 100vw, 1190px\" \/><\/p>\n<p>After a few minutes, you can connect to the WebUI by domain name using the HTTPS protocol<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2478\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.36.44.png\" alt=\"\" width=\"1430\" height=\"1058\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.36.44.png 1430w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.36.44-300x222.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.36.44-1024x758.png 1024w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.36.44-768x568.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.36.44-954x706.png 954w, https:\/\/artem.services\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-19-at-22.36.44-1354x1002.png 1354w\" sizes=\"(max-width: 1430px) 100vw, 1430px\" \/><\/p>\n<p>&nbsp;<\/p>\n<blockquote><p>Don&#8217;t forget to create a DNS record pointing to your firewall<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><strong>GlobalProtect<\/strong><\/p>\n<p>To import a certificate for GlobalProtect, you need to follow all the same steps and specify the required profile when configuring the portal and gateway.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PAN-OS only allows you to generate self-signed certificates or already import existing ones. To use a Let&#8217;s Encrypt certificate, you need to request it on another device, and therefore we can only use DNS as validation. AWS Route53 is used as a DNS provider, we will use Certbot to obtain a certificate, we also need &hellip; <a href=\"https:\/\/artem.services\/?p=2485&#038;lang=en\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u044c<span class=\"screen-reader-text\"> &quot;Palo Alto VM-Series Firewall: Let&#8217;s Encrypt certificate&quot;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[599,1335],"tags":[543,1899,1911,1905,347],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2485"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2485"}],"version-history":[{"count":5,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2485\/revisions"}],"predecessor-version":[{"id":2494,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2485\/revisions\/2494"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}