{"id":154,"date":"2022-06-26T20:28:21","date_gmt":"2022-06-27T01:28:21","guid":{"rendered":"https:\/\/cloudlearning365.com\/?p=154"},"modified":"2022-10-14T09:38:56","modified_gmt":"2022-10-14T14:38:56","slug":"secure-aviatrix-controller-with-azure-application-gateway-v2","status":"publish","type":"post","link":"https:\/\/cloudlearning365.com\/?p=154","title":{"rendered":"Secure Aviatrix Controller with Azure Application Gateway V2"},"content":{"rendered":"\n<p>Aviatrix controller is already hardened. You may further lock it down with Settings -&gt; Controller -&gt; Access Security -&gt; Controller Security Group Management. The controller would be protected by Security Group allowing access only from Aviatrix Gateways. Customer can add their own egress public IPs and CoPilot public IPs to security group, allowing inbound HTTPs access to the Aviatrix controller.<\/p>\n\n\n\n<p>Enterprises already utilizing Azure Application Gateway\/ WAF may want to place the Aviatrix controller behind it, for tighter security. This blog post shows how to place the Aviatrix controller behind Azure Application Gateway\/WAF<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"987\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/Azure-Application-Gateway-Protected-Aviatrix-Controller-1.png\" alt=\"\" class=\"wp-image-162\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/Azure-Application-Gateway-Protected-Aviatrix-Controller-1.png 865w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/Azure-Application-Gateway-Protected-Aviatrix-Controller-1-263x300.png 263w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/Azure-Application-Gateway-Protected-Aviatrix-Controller-1-768x876.png 768w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p>Before continue on, you need to make sure:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Already own your domain name, such as mydomain.com<\/li><li>Already requested SSL certificate for aviatrix controller, such as avx.domain.com, refer to my <a href=\"https:\/\/cloudlearning365.com\/?p=139\">previous blog post<\/a><\/li><li>Assigned full-chain cert to the aviatrix controller as Server Public Certificate section, refer to <a href=\"https:\/\/azureaggregator.wordpress.com\/2022\/04\/01\/azure-application-gateway-502-error-due-to-backend-certificate-not-whitelisted-in-the-appgw-3\/\">this post<\/a> , and <a href=\"https:\/\/www.howtouselinux.com\/post\/certificate-chain\">this post<\/a> (note, Application gateway doesn&#8217;t support self-signed certificate as backend)<\/li><li>In your domain DNS, avx.domain.com is set to point to the Aviatrix controller&#8217;s public IP, eg: 20.20.20.10 as shown above<\/li><li>Tested that https:\/\/avx.mydomain.com works as desired<\/li><\/ol>\n\n\n\n<p>Let&#8217;s get started:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Application gateway require it&#8217;s own subnet, <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/application-gateway\/configuration-infrastructure\">this article<\/a> recommended \/24 subnet, create such subnet in the same vNet where Aviatrix Controller and CoPilot resides.<\/li><li>Fill in basic information to create application gateway<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"895\" height=\"1024\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-11-895x1024.png\" alt=\"\" class=\"wp-image-164\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-11-895x1024.png 895w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-11-262x300.png 262w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-11-768x878.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-11.png 1114w\" sizes=\"auto, (max-width: 895px) 100vw, 895px\" \/><\/figure>\n\n\n\n<p>3. Add or use existing public IP for frontends<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"373\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-12-1024x373.png\" alt=\"\" class=\"wp-image-165\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-12-1024x373.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-12-300x109.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-12-768x280.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-12.png 1115w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>4. Add the Aviatrix Controller as backend pool<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"524\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-13-1024x524.png\" alt=\"\" class=\"wp-image-166\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-13-1024x524.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-13-300x153.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-13-768x393.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-13-1536x785.png 1536w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-13.png 1889w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>5. Add routing rules<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"343\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-14-1024x343.png\" alt=\"\" class=\"wp-image-167\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-14-1024x343.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-14-300x100.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-14-768x257.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-14-1536x514.png 1536w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-14.png 1741w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>6. Application gateway requires PFX certificate file for the SSL listener , in my previous post of obtaining SSL for Aviatrix controller, I&#8217;m using ZeroSSL to obtain SSL certificate. <a href=\"https:\/\/help.zerossl.com\/hc\/en-us\/articles\/360058296034-Certificate-Format\">this article<\/a> show how to create a PFX certificate from the three files issued by ZeroSSL:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"474\" height=\"167\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-15.png\" alt=\"\" class=\"wp-image-168\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-15.png 474w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-15-300x106.png 300w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/figure>\n\n\n\n<p>On MacOS or Linux:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat certificate.crt ca_bundle.crt &gt; full_chain.crt\nopenssl pkcs12 -export -out certificate.p12 -inkey private.key -in full_chain.crt<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">On Windows:<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>copy \/b certificate.crt + ca_bundle.crt full_chain.crt\nopenssl pkcs12 -export -out certificate.p12 -inkey private.key -in full_chain.crt<\/code><\/pre>\n\n\n\n<p><strong>Note<\/strong>: There is a PowerShell module <a href=\"https:\/\/github.com\/rmbolger\/Posh-ACME\">Posh-ACME<\/a> help you to create all these certificates from an ACME capable certificate authority such as&nbsp;<a href=\"https:\/\/letsencrypt.org\/\">Let&#8217;s Encrypt<\/a>.<\/p>\n\n\n\n<p>Once obtained the PFX certificate, provide it and password through the listener workflow:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"838\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-16-1024x838.png\" alt=\"\" class=\"wp-image-169\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-16-1024x838.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-16-300x246.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-16-768x629.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-16.png 1257w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In the Backend targets tab, pick backend pool from drop down, then <strong>Add new<\/strong> for <strong>Backend settings<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"858\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-17-1024x858.png\" alt=\"\" class=\"wp-image-170\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-17-1024x858.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-17-300x251.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-17-768x643.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-17.png 1250w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In Add Backend setting section, pick HTTPS as backend protocol (assuming your Aviatrix Controller already listen on HTTPS and already using Full-Chain certificate as server public cert.<\/p>\n\n\n\n<p>One thing to note, if you obtained a certificate from a well known CA (Certificate Authority), then you can pick Yes in Use well known CA certificate, <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"912\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-18-1024x912.png\" alt=\"\" class=\"wp-image-171\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-18-1024x912.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-18-300x267.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-18-768x684.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-18.png 1259w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>If you are not using a well known CA issued certificate such as your Enterprise CA,  you will need to provide <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/application-gateway\/certificates-for-backend-authentication#export-trusted-root-certificate-for-v2-sku\">Base-64 encoded X.509 (.CER)<\/a> of the root CA cert. The following example shows extracting the root CA cert using a Windows client with Chrome browser:<\/p>\n\n\n\n<p>Visit your SSL enabled Aviatrix controller, then click on the pad lock<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"637\" height=\"176\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-19.png\" alt=\"\" class=\"wp-image-173\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-19.png 637w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-19-300x83.png 300w\" sizes=\"auto, (max-width: 637px) 100vw, 637px\" \/><\/figure>\n\n\n\n<p>Click and expand <strong>Connection is secure<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"372\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-23.png\" alt=\"\" class=\"wp-image-177\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-23.png 683w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-23-300x163.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<p>Click on <strong>Certificate is valid<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"685\" height=\"452\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-24.png\" alt=\"\" class=\"wp-image-178\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-24.png 685w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-24-300x198.png 300w\" sizes=\"auto, (max-width: 685px) 100vw, 685px\" \/><\/figure>\n\n\n\n<p>This opens up the server certificate<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"732\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-26.png\" alt=\"\" class=\"wp-image-180\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-26.png 594w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-26-243x300.png 243w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/figure>\n\n\n\n<p>Click on <strong>Certificate Path<\/strong> tab, certificate is ordered as:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Root Certificate Authority<ul><li>Intermediate Certificate Authority<ul><li>Server Certificate<\/li><\/ul><\/li><\/ul><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"606\" height=\"741\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-27.png\" alt=\"\" class=\"wp-image-181\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-27.png 606w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-27-245x300.png 245w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/figure>\n\n\n\n<p>Since we need the root CA, we need to double click on Sectigo in this example<\/p>\n\n\n\n<p>Notice in <strong>General <\/strong>tab, issued to and issued by are the same. Root CA is a self signed certificate. Then click on <strong>Details <\/strong>tab<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"603\" height=\"738\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-28.png\" alt=\"\" class=\"wp-image-182\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-28.png 603w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-28-245x300.png 245w\" sizes=\"auto, (max-width: 603px) 100vw, 603px\" \/><\/figure>\n\n\n\n<p>Click on <strong>Copy to File&#8230;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"601\" height=\"735\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-29.png\" alt=\"\" class=\"wp-image-183\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-29.png 601w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-29-245x300.png 245w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/figure>\n\n\n\n<p>Click on Next, then choose <strong><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/application-gateway\/certificates-for-backend-authentication#export-trusted-root-certificate-for-v2-sku\">Base-64 encoded X.509<\/a><\/strong>. <\/p>\n\n\n\n<p><a href=\"https:\/\/www.ssl.com\/guide\/pem-der-crt-and-cer-x-509-encodings-and-conversions\/\"><em>This article<\/em><\/a> is an interesting read about the difference of certificate formats.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"764\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-30.png\" alt=\"\" class=\"wp-image-184\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-30.png 795w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-30-300x288.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-30-768x738.png 768w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/figure>\n\n\n\n<p>Save the file as <strong>root.cer<\/strong>, goes back to <strong>Add Backend setting<\/strong> for Application Gateway, choose <strong>No<\/strong> for <strong>Use well known CA certificate<\/strong>, and upload <strong>root.cer<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"971\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-31-1024x971.png\" alt=\"\" class=\"wp-image-185\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-31-1024x971.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-31-300x285.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-31-768x729.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-31.png 1247w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This brings back to <strong>Add a routing rule workflow<\/strong>, and the <strong>Backend settings<\/strong> is now complete, click on <strong>Add <\/strong>on bottom of the page<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"828\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-33.png\" alt=\"\" class=\"wp-image-187\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-33.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-33-300x243.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-33-768x621.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click on Next: Tags -&gt; Next: Review + Create -&gt; Create<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"574\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-34-1024x574.png\" alt=\"\" class=\"wp-image-188\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-34-1024x574.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-34-300x168.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-34-768x430.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-34-1536x861.png 1536w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-34.png 1726w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>If everything goes well, check Application Gateway -&gt; Backend Health, you should see Status healthy<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"351\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-35-1024x351.png\" alt=\"\" class=\"wp-image-190\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-35-1024x351.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-35-300x103.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-35-768x263.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-35-1536x526.png 1536w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-35.png 1882w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You may change your Windows Client c:\\windows\\system32\\drivers\\etc\\hosts file to have avx.mydomain.com map to Application Gateway&#8217;s public IP. Then reopen browser window try to access https:\/\/avx.mydomain.com<\/p>\n\n\n\n<p>If this is successful:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Update your DNS hosting record, so avx.mydomain.com will map to Application Gateway&#8217;s public IP, instead of Aviatrix Controller&#8217;s public IP<\/li><li>Enable WAF in detection mode, and gradually enable rules that won&#8217;t break Aviatrix Controller&#8217;s function<\/li><li>Further lock down aviatrix controller&#8217;s network security group by removing your egress public IPs.<\/li><\/ol>\n\n\n\n<p>Common error, when Aviatrix controller server certificate doesn&#8217;t contain full-chain (need both Intermediate CA and Server Certificate)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>The root certificate of the server certificate used by the backend does not match the trusted root certificate added to the application gateway. Ensure that you add the correct root certificate to whitelist the backend\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"399\" src=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-36-1024x399.png\" alt=\"\" class=\"wp-image-191\" srcset=\"https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-36-1024x399.png 1024w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-36-300x117.png 300w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-36-768x299.png 768w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-36-1536x599.png 1536w, https:\/\/cloudlearning365.com\/wp-content\/uploads\/2022\/06\/image-36.png 1619w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Aviatrix controller is already hardened. You may further lock it down with Settings -&gt; Controller -&gt; Access Security -&gt; Controller Security Group Management. The controller would be protected by Security Group allowing access only from Aviatrix Gateways. Customer can add &hellip; <a href=\"https:\/\/cloudlearning365.com\/?p=154\">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,4],"tags":[],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-aviatrix","category-azure"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts\/154","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=154"}],"version-history":[{"count":8,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":694,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=\/wp\/v2\/posts\/154\/revisions\/694"}],"wp:attachment":[{"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudlearning365.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}