<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>azure firewall Archives - Apostolidis Cloud Corner</title>
	<atom:link href="https://www.cloudcorner.gr/tag/azure-firewall/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.cloudcorner.gr/tag/azure-firewall/</link>
	<description>Remarks from a Cloud Architect encounters</description>
	<lastBuildDate>Fri, 13 Oct 2023 09:26:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.cloudcorner.gr/wp-content/uploads/2021/04/cropped-cloudcorner2-32x32.png</url>
	<title>azure firewall Archives - Apostolidis Cloud Corner</title>
	<link>https://www.cloudcorner.gr/tag/azure-firewall/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Bicep: Azure Virtual WAN Playground</title>
		<link>https://www.cloudcorner.gr/microsoft/azure/bicep-azure-virtual-wan-playground/</link>
					<comments>https://www.cloudcorner.gr/microsoft/azure/bicep-azure-virtual-wan-playground/#respond</comments>
		
		<dc:creator><![CDATA[Pantelis Apostolidis]]></dc:creator>
		<pubDate>Fri, 13 Oct 2023 09:24:26 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[IaC]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[azure firewall]]></category>
		<category><![CDATA[azure vm]]></category>
		<category><![CDATA[azurerm]]></category>
		<category><![CDATA[bicep]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[iac]]></category>
		<category><![CDATA[virtual wan]]></category>
		<category><![CDATA[vwan]]></category>
		<guid isPermaLink="false">https://www.cloudcorner.gr/?p=4064</guid>

					<description><![CDATA[<p>Azure Virtual WAN is a networking service that brings many networking, security, and routing functionalities together to provide a single</p>
<p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/bicep-azure-virtual-wan-playground/">Bicep: Azure Virtual WAN Playground</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><a href="https://learn.microsoft.com/en-us/azure/virtual-wan/virtual-wan-about">Azure Virtual WAN</a> is a networking service that brings many networking, security, and routing functionalities together to provide a single operational interface. A virtual hub is a Microsoft-managed virtual network that enables connectivity from other resources. When a virtual hub is created from a Virtual WAN in the Azure portal, a virtual hub VNet and gateways (optional) are created as its components.</p>



<p>Recently I created a Bicep code to create an <strong>Azure Virtual WAN with 2 Hubs, Azure Firewalls, and spoke VNETs &amp; VMs</strong>, to use it for PoCs, Labs, and Tests. You can find it at my repo: <a href="https://github.com/proximagr/VWAN"><strong>https://github.com/proximagr/VWAN</strong></a></p>



<p><strong>The script deploys</strong>:</p>



<ul class="wp-block-list">
<li>One Log Analytics workspace</li>



<li>Four VETS, two on each Azure Region.</li>



<li>one VWAN with two VWAN HUBs, each on a different Azure Region.</li>



<li>Two Azure Firewalls inside the VWAN Hubs, each on a different Azure Region. The Azure Firewalls have diagnostic settings sending all logs to a log analytics workspace.</li>



<li>Two Azure Firewalls outside the VWAN Hubs, each on a different Azure Region. The Azure Firewalls have diagnostic settings sending all logs to a log analytics workspace.</li>



<li>Four VMs, Ubuntu, one in each VNET</li>
</ul>



<p><strong>You can choose to</strong>:</p>



<ul class="wp-block-list">
<li>deploy VWAN or not</li>



<li>deploy Azure Firewall inside the VWAN Hubs</li>



<li>deploy VMs or not</li>



<li>deploy Azure Firewall outside the VWAN Hubs or not</li>



<li>how many Public IPs will be created and attached to the Azure Firewalls</li>



<li>The Azure Firewall SKU between Basic and Standard</li>
</ul>



<p><strong>The script does NOT deploy the connections</strong>&nbsp;between the VWAN Hubs &amp; the VNETS. Once the VWAN Hubs are ready, with Hub Status &#8220;Succeeded&#8221;&nbsp;<strong>and</strong>&nbsp;Router Status &#8220;Provisioned&#8221;, create the connections manually. This is because to create a connection the VWAN Hub Router Status must be &#8220;Provisioned&#8221; and currently, the is no way of getting this Status.</p>



<p>The VMs are for testing &amp; troubleshooting. Ubuntu Linux, without Public IP. I usually use the Serial console.</p>



<h2 class="wp-block-heading" id="user-content-deployment-commands-for-azure-cli">Deployment Commands for Azure Cli:</h2>



<p><strong>create the Resource Group</strong>&nbsp;az group create &#8211;name ResourceGroupName &#8211;location PreferedLocation</p>



<p><strong>deploy the bicep script and answer the questions interactively</strong>&nbsp;az deployment group create &#8211;resource-group ResourceGroupName &#8211;template-file main.bicep</p>



<p><strong>deploy the bicep script with the required parameters and choose true false</strong>&nbsp;az deployment group create &#8211;resource-group ResourceGroupName &#8211;template-file main.bicep &#8211;parameters numberOfFirewallPublicIPAddresses=1 adminPassword=&#8217;#########&#8217; adminUserName=&#8217;######&#8217; deployVWAN=true addFirewallToVWAN=true deployFirewall=true deployFirewallBasic=true deployVMs=true</p>



<h2 class="wp-block-heading">Deployment Diagram</h2>



<figure class="wp-block-image size-large"><a href="https://www.cloudcorner.gr/wp-content/uploads/2023/10/vwan-white.png"><img fetchpriority="high" decoding="async" width="702" height="1024" src="https://www.cloudcorner.gr/wp-content/uploads/2023/10/vwan-white-702x1024.png" alt="" class="wp-image-4065" srcset="https://www.cloudcorner.gr/wp-content/uploads/2023/10/vwan-white-702x1024.png 702w, https://www.cloudcorner.gr/wp-content/uploads/2023/10/vwan-white-206x300.png 206w, https://www.cloudcorner.gr/wp-content/uploads/2023/10/vwan-white-768x1120.png 768w, https://www.cloudcorner.gr/wp-content/uploads/2023/10/vwan-white-1053x1536.png 1053w, https://www.cloudcorner.gr/wp-content/uploads/2023/10/vwan-white.png 1254w" sizes="(max-width: 702px) 100vw, 702px" /></a></figure>



<h2 class="wp-block-heading">VWAN Lab: <a href="https://github.com/proximagr/VWAN">https://github.com/proximagr/VWAN</a></h2>
<div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author"><div class="saboxplugin-tab"><div class="saboxplugin-gravatar"><img decoding="async" src="https://www.e-apostolidis.gr/wp-content/uploads/2019/05/mvpsummit2019.jpg" width="100"  height="100" alt="Pantelis Apostolidis" itemprop="image"></div><div class="saboxplugin-authorname"><a href="https://www.cloudcorner.gr/author/admin/" class="vcard author" rel="author"><span class="fn">Pantelis Apostolidis</span></a></div><div class="saboxplugin-desc"><div itemprop="description"><p>Pantelis Apostolidis is a Sr. Specialist, Azure at Microsoft and a former Microsoft Azure MVP. For the last 20 years, Pantelis has been involved to major cloud projects in Greece and abroad, helping companies to adopt and deploy cloud technologies, driving business value. He is entitled to a lot of Microsoft Expert Certifications, demonstrating his proven experience in delivering high quality solutions. He is an author, blogger and he is acting as a spokesperson for conferences, workshops and webinars. He is also an active member of several communities as a moderator in azureheads.gr and autoexec.gr. Follow him on Twitter @papostolidis.</p>
</div></div><div class="saboxplugin-web "><a href="https://www.cloudcorner.gr" target="_self" >www.cloudcorner.gr</a></div><div class="clearfix"></div><div class="saboxplugin-socials "><a title="Facebook" target="_blank" href="https://www.facebook.com/pantelis.apostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg></span></a><a title="Linkedin" target="_blank" href="https://www.linkedin.com/in/papostolidis/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-linkedin" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"></path></svg></span></a><a title="Instagram" target="_blank" href="https://www.instagram.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg></span></a><a title="Rss" target="_blank" href="https://wwwcloudcorner.gr/feed/rdf/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-rss" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"></path></svg></span></a><a title="Twitter" target="_blank" href="https://twitter.com/papostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" /></svg></span></a><a title="Github" target="_blank" href="https://github.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-github" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></span></a><a title="User email" target="_self" href="mailto:&#112;&#114;&#111;x&#105;&#109;&#097;gr&#064;h&#111;&#116;mai&#108;.c&#111;&#109;" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-user_email" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg></span></a></div></div></div><p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fbicep-azure-virtual-wan-playground%2F&amp;linkname=Bicep%3A%20Azure%20Virtual%20WAN%20Playground" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_print" href="https://www.addtoany.com/add_to/print?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fbicep-azure-virtual-wan-playground%2F&amp;linkname=Bicep%3A%20Azure%20Virtual%20WAN%20Playground" title="Print" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fbicep-azure-virtual-wan-playground%2F&#038;title=Bicep%3A%20Azure%20Virtual%20WAN%20Playground" data-a2a-url="https://www.cloudcorner.gr/microsoft/azure/bicep-azure-virtual-wan-playground/" data-a2a-title="Bicep: Azure Virtual WAN Playground"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/bicep-azure-virtual-wan-playground/">Bicep: Azure Virtual WAN Playground</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cloudcorner.gr/microsoft/azure/bicep-azure-virtual-wan-playground/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Azure Firewall Policy Rules to CSV</title>
		<link>https://www.cloudcorner.gr/microsoft/azure/azure-firewall-policy-rules-to-csv/</link>
					<comments>https://www.cloudcorner.gr/microsoft/azure/azure-firewall-policy-rules-to-csv/#comments</comments>
		
		<dc:creator><![CDATA[Pantelis Apostolidis]]></dc:creator>
		<pubDate>Sat, 12 Feb 2022 08:21:53 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[azure firewall]]></category>
		<category><![CDATA[azure firewall policies]]></category>
		<category><![CDATA[azurerm]]></category>
		<category><![CDATA[powershell]]></category>
		<guid isPermaLink="false">https://www.cloudcorner.gr/?p=3903</guid>

					<description><![CDATA[<p>Azure Firewall is a virtual network firewall service that provides your resources in an Azure Virtual Network. It&#8217;s a firewall</p>
<p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/azure-firewall-policy-rules-to-csv/">Azure Firewall Policy Rules to CSV</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Azure Firewall is a virtual network firewall service that provides your resources in an Azure Virtual Network. It&#8217;s a firewall as a service, build on the cloud for the cloud. It provides both east-west and north-south traffic inspection. Some features are Threat Intelligence, DNAT, SNAT, Application &amp; Network filtering rules, DNS Proxy, TLS Inspection, IDPS, URL Filtering, Web Categories. And as an Azure native service has built-in high availability and cloud scalability.</p>



<p>There is plenty of information and guides for Azure Firewall at the Microsoft Docs <a href="https://docs.microsoft.com/en-us/azure/firewall/">Azure Firewall documentation | Microsoft Docs</a>. In this post, I want to share some PowerShell scripts that we created with my colleague Panagiotis Tsoukias. One script to Export all Firewall Policy rules, of all Policy Groups in a CSV file. Then edit the rules in Excel.  And a second script to import the rules to the same or to a different Firewall Policy.</p>



<h2 class="wp-block-heading" id="export-the-azure-firewall-policy-rules">Export the Azure Firewall Policy Rules</h2>



<p>The first script is to Export the Firewall Policy Rules of a Rule Collection, in a manageable CSV format. Edit the script, change the first three variables, and the path to export, and run it. Open the exported CSV with Microsoft Excel and you will have this result:</p>



<figure class="wp-block-image size-large"><a href="https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-5.png"><img decoding="async" width="1024" height="87" src="https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-5-1024x87.png" alt="csv export" class="wp-image-3905" srcset="https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-5-1024x87.png 1024w, https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-5-300x26.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-5-768x66.png 768w, https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-5.png 1090w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>The first three columns are the Rule Collection&#8217;s Name, Priority &amp; Action Type. We will need this info to create the Rule Collections and import the rules to the corresponding Rule Collection.</p>



<p>You can copy the script from the below box or download it from my GitHub link: <strong><a href="https://github.com/proximagr/automation/blob/master/Export%20Azure%20Firewall%20Policy%20Rules.ps1">Export Azure Firewall Policy Rules.ps1</a></strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">#Provide Input. Firewall Policy Name, Firewall Policy Resource Group &amp; Firewall Policy Rule Collection Group Name
$fpname = azfwpolicy
$fprg = azurehub
$fprcgname = DefaultNetworkRuleCollectionGroup

$fp = Get-AzFirewallPolicy -Name $fpname -ResourceGroupName $fprg
$rcg = Get-AzFirewallPolicyRuleCollectionGroup -Name $fprcgname -AzureFirewallPolicy $fp

$returnObj = @()
foreach ($rulecol in $rcg.Properties.RuleCollection) {

foreach ($rule in $rulecol.rules)
{
$properties = [ordered]@{
    RuleCollectionName = $rulecol.Name;
    RulePriority = $rulecol.Priority;
    ActionType = $rulecol.Action.Type;
    RUleConnectionType = $rulecol.RuleCollectionType;
    Name = $rule.Name;
    protocols = $rule.protocols -join ", ";
    SourceAddresses = $rule.SourceAddresses -join ", ";
    DestinationAddresses = $rule.DestinationAddresses -join ", ";
    SourceIPGroups = $rule.SourceIPGroups -join ", ";
    DestinationIPGroups = $rule.DestinationIPGroups -join ", ";
    DestinationPorts = $rule.DestinationPorts -join ", ";
    DestinationFQDNs = $rule.DestinationFQDNs -join ", ";
}
$obj = New-Object psobject -Property $properties
$returnObj += $obj
}

#change c:\temp to the path to export the CSV
$returnObj | Export-Csv c:\temp\rules.csv -NoTypeInformation
}</pre>



<h2 class="wp-block-heading" id="import-the-azure-firewall-policy-rules">Import the Azure Firewall Policy Rules</h2>



<p>After done editing the rules in Excel, we are ready to import them back to the Azure Policy or to a new Azure Policy.  We need to export one CSV per Rule Collection. It will help us that the first column has the Rule Collection Name. Then run the import script. The script creates a Rule Collection, if it does not already exist, and adds the Rules in this specific Rule Collection.</p>



<p>You can copy the script from the below box or download it from my GitHub link: <strong><a href="https://github.com/proximagr/automation/blob/master/Import%20Azure%20Firewall%20Policy%20Rules.ps1">Import Azure Firewall Policy Rules.ps1</a></strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">#Provide Input. Firewall Policy Name, Firewall Policy Resource Group &amp; Firewall Policy Rule Collection Group Name
$fpname = azfwpolicy
$fprg = azurehub
$fprcgname = DefaultNetworkRuleCollectionGroup

$targetfp = Get-AzFirewallPolicy -Name $fpname -ResourceGroupName $fprg
$targetrcg = New-AzFirewallPolicyRuleCollectionGroup -Name $fprcgname -Priority 200 -FirewallPolicyObject $targetfp

$RulesfromCSV = @()
# Change the folder where the CSV is located
$readObj = import-csv C:\temp\rules.csv
foreach ($entry in $readObj)
{
    $properties = [ordered]@{
        RuleCollectionName = $entry.RuleCollectionName;
        RulePriority = $entry.RulePriority;
        ActionType = $entry.ActionType;
        Name = $entry.Name;
        protocols = $entry.protocols -split ", ";
        SourceAddresses = $entry.SourceAddresses -split ", ";
        DestinationAddresses = $entry.DestinationAddresses -split ", ";
        SourceIPGroups = $entry.SourceIPGroups -split ", ";
        DestinationIPGroups = $entry.DestinationIPGroups -split ", ";
        DestinationPorts = $entry.DestinationPorts -split ", ";
        DestinationFQDNs = $entry.DestinationFQDNs -split ", ";
    }
    $obj = New-Object psobject -Property $properties
    $RulesfromCSV += $obj
}

$RulesfromCSV
Clear-Variable rules
$rules = @()
foreach ($entry in $RulesfromCSV)
{
    $RuleParameter = @{
        Name = $entry.Name;
        Protocol = $entry.protocols
        sourceAddress = $entry.SourceAddresses
        DestinationAddress = $entry.DestinationAddresses
        DestinationPort = $entry.DestinationPorts
    }
    $rule = New-AzFirewallPolicyNetworkRule @RuleParameter
    $NetworkRuleCollection = @{
        Name = $entry.RuleCollectionName
        Priority = $entry.RulePriority
        ActionType = $entry.ActionType
        Rule       = $rules += $rule
    }
}

# Create a network rule collection
$NetworkRuleCategoryCollection = New-AzFirewallPolicyFilterRuleCollection @NetworkRuleCollection
# Deploy to created rule collection group
Set-AzFirewallPolicyRuleCollectionGroup -Name $targetrcg.Name -Priority 200 -RuleCollection $NetworkRuleCategoryCollection -FirewallPolicyObject $targetfp</pre>



<p>Feel free to take, edit, use &amp; comment on the scripts, you can find them at my repo:</p>


<div class="ebg-br-wrapper ebg-br-wrapper-dark-mode-on">
	<div class="ebg-br-background-image"></div>
	<div class="ebg-br-editmode egb-br-darkmode-status">
		<span class="egb-br-darkmode-status-img">Dark Mode</span>
	</div>
	<div class="ebg-br-avatar">
		<img loading="lazy" decoding="async" class="ebg-br-header-avatar" src="https://avatars.githubusercontent.com/u/4180413?v=4" alt="" width="150" height="150" />
	</div>
	<div class="ebg-br-main">
		<p class="ebg-br-title">
			<strong>
				<a target="_blank" rel="noopener noreferrer" href="https://github.com/proximagr/automation">
					automation
					<span class="screen-reader-text">(this link opens in a new window)</span>
				</a>
			</strong>
			<em>
				by<a target="_blank" rel="noopener noreferrer" href="https://github.com/proximagr">
					proximagr
					<span class="screen-reader-text">(this link opens in a new window)</span>
				</a>
			</em>
		</p>
		<p class="ebg-br-description"></p>
		<p class="ebg-br-footer">
			<span class="ebg-br-subscribers">
				<span class="ebg-br-background-image"></span>
				1 Subscriber			</span>
			<span class="ebg-br-watchers">
				<span class="ebg-br-background-image"></span>
				0 Watchers			</span>
			<span class="ebg-br-forks">
				<span class="ebg-br-background-image"></span>
				0 Forks			</span>
			<a target="_blank" rel="noopener noreferrer" class="ebg-br-link" href="https://github.com/proximagr/automation">
				Check out this repository on GitHub.com				<span class="screen-reader-text">(this link opens in a new window)</span>
			</a>
		</p>
	</div>
</div><div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author"><div class="saboxplugin-tab"><div class="saboxplugin-gravatar"><img loading="lazy" decoding="async" src="https://www.e-apostolidis.gr/wp-content/uploads/2019/05/mvpsummit2019.jpg" width="100"  height="100" alt="Pantelis Apostolidis" itemprop="image"></div><div class="saboxplugin-authorname"><a href="https://www.cloudcorner.gr/author/admin/" class="vcard author" rel="author"><span class="fn">Pantelis Apostolidis</span></a></div><div class="saboxplugin-desc"><div itemprop="description"><p>Pantelis Apostolidis is a Sr. Specialist, Azure at Microsoft and a former Microsoft Azure MVP. For the last 20 years, Pantelis has been involved to major cloud projects in Greece and abroad, helping companies to adopt and deploy cloud technologies, driving business value. He is entitled to a lot of Microsoft Expert Certifications, demonstrating his proven experience in delivering high quality solutions. He is an author, blogger and he is acting as a spokesperson for conferences, workshops and webinars. He is also an active member of several communities as a moderator in azureheads.gr and autoexec.gr. Follow him on Twitter @papostolidis.</p>
</div></div><div class="saboxplugin-web "><a href="https://www.cloudcorner.gr" target="_self" >www.cloudcorner.gr</a></div><div class="clearfix"></div><div class="saboxplugin-socials "><a title="Facebook" target="_blank" href="https://www.facebook.com/pantelis.apostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg></span></a><a title="Linkedin" target="_blank" href="https://www.linkedin.com/in/papostolidis/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-linkedin" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"></path></svg></span></a><a title="Instagram" target="_blank" href="https://www.instagram.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg></span></a><a title="Rss" target="_blank" href="https://wwwcloudcorner.gr/feed/rdf/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-rss" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"></path></svg></span></a><a title="Twitter" target="_blank" href="https://twitter.com/papostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" /></svg></span></a><a title="Github" target="_blank" href="https://github.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-github" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></span></a><a title="User email" target="_self" href="mailto:p&#114;oxi&#109;&#097;g&#114;&#064;h&#111;&#116;m&#097;il.&#099;&#111;m" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-user_email" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg></span></a></div></div></div><p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fazure-firewall-policy-rules-to-csv%2F&amp;linkname=Azure%20Firewall%20Policy%20Rules%20to%20CSV" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_print" href="https://www.addtoany.com/add_to/print?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fazure-firewall-policy-rules-to-csv%2F&amp;linkname=Azure%20Firewall%20Policy%20Rules%20to%20CSV" title="Print" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fazure-firewall-policy-rules-to-csv%2F&#038;title=Azure%20Firewall%20Policy%20Rules%20to%20CSV" data-a2a-url="https://www.cloudcorner.gr/microsoft/azure/azure-firewall-policy-rules-to-csv/" data-a2a-title="Azure Firewall Policy Rules to CSV"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/azure-firewall-policy-rules-to-csv/">Azure Firewall Policy Rules to CSV</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cloudcorner.gr/microsoft/azure/azure-firewall-policy-rules-to-csv/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title>Azure Routing Experiences &#124; Scenario 1</title>
		<link>https://www.cloudcorner.gr/microsoft/azure-routing-experiences-scenario-1/</link>
					<comments>https://www.cloudcorner.gr/microsoft/azure-routing-experiences-scenario-1/#comments</comments>
		
		<dc:creator><![CDATA[Pantelis Apostolidis]]></dc:creator>
		<pubDate>Sun, 06 Feb 2022 18:41:14 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[azure firewall]]></category>
		<category><![CDATA[dns proxy]]></category>
		<category><![CDATA[peering]]></category>
		<category><![CDATA[private endpoints]]></category>
		<category><![CDATA[route tables]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[udr]]></category>
		<category><![CDATA[virtual network]]></category>
		<category><![CDATA[vnet]]></category>
		<category><![CDATA[vnet peering]]></category>
		<category><![CDATA[vpn]]></category>
		<guid isPermaLink="false">https://20.113.141.97/?p=3838</guid>

					<description><![CDATA[<p>Designing the network routing, cloud &#38; hybrid, on a Hyperscaler like Microsoft Azure can get a real pain. I got</p>
<p>The post <a href="https://www.cloudcorner.gr/microsoft/azure-routing-experiences-scenario-1/">Azure Routing Experiences | Scenario 1</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Designing the network routing, cloud &amp; hybrid, on a Hyperscaler like Microsoft Azure can get a real pain. I got an idea, to start playing with some common scenarios and make some notes, in order to have it as a reference. I end up with three scenarios. Those scenarios are referring to internal network topology, without public access, and I focus more on the routing aspect, the DNS configuration &amp; inspection through Azure Firewall.</p>



<ul class="wp-block-list"><li><a href="/microsoft/azure-routing-experiences-scenario-1/" data-type="post" data-id="3838"></a><a href="/microsoft/azure-routing-experiences-scenario-1/" data-type="post" data-id="3838"></a><a href="/microsoft/azure-routing-experiences-scenario-1/" data-type="post" data-id="3838">Scenario 1: Hybrid connectivity with Azure VPN Gateway</a></li><li><a href="/microsoft/azure-routing-experiences-scenario-1/" data-type="post" data-id="3838"></a><a href="/microsoft/azure-routing-experiences-scenario-1/" data-type="post" data-id="3838"></a><a href="/microsoft/azure-routing-experiences-scenario-2/" data-type="post" data-id="3846">Scenario 2: Hybrid connectivity with Azure VPN Gateway &amp; Traffic Inspection with Azure Firewall</a></li><li><a href="/microsoft/azure-routing-experiences-scenario-1/" data-type="post" data-id="3838"></a><a href="/microsoft/azure-routing-experiences-scenario-1/" data-type="post" data-id="3838"></a><a href="/microsoft/azure-routing-experiences-scenario-3/" data-type="post" data-id="3859">Scenario 3: Hybrid Connectivity with Azure VPN Gateway, second level peered networks &amp; full traffic inspection with Azure Firewall</a></li></ul>



<h2 class="wp-block-heading" id="scenario-1-hybrid-connectivity-through-azure-vpn-gateway">Scenario 1: Hybrid connectivity through Azure VPN gateway</h2>



<p>At the start, I created the on-premises network, using a RRAS (Windows Server 2019 with Routing &amp; Remote Access) to act as the router/VPN device and a Server with DNS service. The Azure estate has three VNets, in a hub &amp; spoke topology. One HUB and two Spokes, connected with the HUB with VNet peering. There is no peering between the spokes. My Azure HUB network has three subnets, one has a VPN Gateway, the second has a VM, and the third has an Azure Firewall. In this first scenario, the Azure Firewall acts only as a DNS Proxy. It is not included in routing.</p>



<ul class="wp-block-list"><li>On-premises network: 10.0.0.0/16</li><li>HUB VNet Address Space: 192.168.0.0/22</li><li>HUB GatewaySubnet: 192.168.1.0/24</li><li>HUB VMSubnet: 192.168.0.0/24</li><li>HUB Firewall Subnet: 192.168.2.0/24</li><li>Spoke1 (storage account): 192.168.4.0/24</li><li>Spoke2 (VM): 192.168.5.0/24</li></ul>



<p>The first spoke has a Private Link to my storage account. The second spoke has a VM.. Azure VPN Gateway knows all routes of its VNet, the peered VNets &amp; the routes propagated from the VPN connection. From on-premises, we can reach all resources using the VPN connection interface ( in RRAS I added a custom route &#8220;192.168.0.0 255.255.0.0 interface:AzureGW&#8221;)</p>



<p>From the VM of the HUB VNet (192.168.0.4), in order to be able to reach the on-premises network, we need a custom route, since the on-premises network is not populated to the VNet. I created a <a href="https://docs.microsoft.com/en-us/azure/virtual-network/manage-route-table" target="_blank" rel="noreferrer noopener">Route Table</a>, with route &#8220;10.0.0.0/16 Next Hop: Virtual Network Gateway&#8221; attached to the VM Subnet. </p>



<p>To access the <a href="https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns" data-type="URL" data-id="https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns" target="_blank" rel="noreferrer noopener">Private Endpoint of the Storage account we need some more resources &amp; configuration</a>. The storage account, as all PaaS services (like Web App &amp; Azure SQL) responds only to URI and not to IP. Since we have connected a Private Endpoint to the Storage Account, the Public Access is blocked. So, in order to connect to the storage account, we need the aprostore.file.core.windows.net to translate to the private IP of the storage account, the 192.168.4.4. The proper way to achieve this is by using DNS. </p>



<p>First, we need to create a Private DNS zone and <a rel="noreferrer noopener" href="https://docs.microsoft.com/en-us/azure/dns/private-dns-virtual-network-links" target="_blank">link </a>it to the HUB VNET. For accessing blob storage we need a <a rel="noreferrer noopener" href="https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns#azure-services-dns-zone-configuration" target="_blank">Private DNS zone with the name</a> privatelink.blob.core.windows.net, for the file we need privatelink.file.core.windows.net. <a rel="noreferrer noopener" href="https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns#azure-services-dns-zone-configuration" target="_blank">More services here</a>. Then add the Storage Account Private Endpoint record to the Private DNS Zone. Now there is an A record azappsa with IP 192.168.4.4. Now, all Azure resources at the linked VNet, the HUB, are able to resolve the DNS records of the Private DNS Zone. We cannot resolve the records of the Azure Private DNS Zone from on-premises. To do so, we need a DNS server on Azure, to use as a conditional forwarder. This can be a Windows or Linux VM with DNS services or in my case, the Azure FIrewall with the <a rel="noreferrer noopener" href="https://docs.microsoft.com/en-us/azure/firewall/dns-details" target="_blank">DNS proxy</a> enabled (I will use the whole functionality of the firewall to my next scenarios). I enabled the DNS Proxy on Azure, using default Azure DNS, and I added a conditional forwarding at the on-premises DNS &#8220;blob.core.windows.net -&gt; 192.168.2.4&#8221; and &#8220;file.core.windows.net -&gt; 192.168.2.44&#8221;. Now, I can successfully resolve the private IP of the storage account using its name, and be able to connect to it to both blob and to files with SMB access.</p>



<p>From the VM of the Spoke2 VNet (192.168.5.4), in order to be able to reach the on-premises network, we need a custom route, since the on-premises network is not populated to the VNet. I created a Route Table, with route &#8220;10.0.0.0/16 Next Hop: Virtual Network Gateway&#8221; attached to the VM Subnet. I added a second route &#8220;192.168.4.0/24 Next Hop: Virtual Network Gateway&#8221; &amp; changed the VNet DNS to 192.168.2.4 (the Azure Firewall) to be able to access the Spoke1 VNet for storage access.</p>



<h2 class="wp-block-heading" id="dns-routing-example">DNS &amp; Routing example</h2>



<p><strong>DNS</strong>: The on-premises Server X, 10.0.2.10, makes a request to https://azappsa.blob.core.windows.net. At first, it asks the DNS to resolve the URL to an IP. The DNS has a conditional forwarder about blob.core.windows.net, and asks the Azure Firewall, 192.168.2.4. Azure Firewall has a linked Private DNS zone that has a host record for azappsa.blob.core.windows.net and it resolves to 192.168.4.4. This information routes back to Server X. Now Server X knows that the IP address of azappsa.blob.core.windows.net is 192.168.4.4. </p>



<p><strong>Routing</strong>: To go to 192.168.4.4 first it asks its Default Gateway, in our case the RRAS. The RRAS has a custom route for 192.168.0.0/16 and forwards the packet to the VPN interface. The packet reaches the Azure VPN Gateway. The Azure VPN Gateway has a custom route for 192.168.0.0/24 BUT it also has a route for 192.168.4.4/32 that is automatically populated by the VNet peering. The /32 route is more specific than the /24 route, so the VPN Gateway forwards the packet directly to the Private Endpoint, bypassing the Azure Firewall. (At the <a href="/microsoft/azure-routing-experiences-scenario-2/">Azure Routing Experiences | Scenario 2</a> we will see how we will force the traffic through the Azure Firewall.</p>



<figure class="wp-block-image size-large"><a href="/wp-content/uploads/2022/02/image-4.png"><img loading="lazy" decoding="async" width="1024" height="465" src="/wp-content/uploads/2022/02/image-4-1024x465.png" alt="" class="wp-image-3889" srcset="https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-4-1024x465.png 1024w, https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-4-300x136.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-4-768x348.png 768w, https://www.cloudcorner.gr/wp-content/uploads/2022/02/image-4.png 1080w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Please find below the whole solution diagram, I tried to make it as analytic as possible, without messing with too many lines. Also, I have some notes and tests below.</p>



<figure class="wp-block-image size-large"><a href="/wp-content/uploads/2022/02/Azure-Hybrid-Network-VPN-GW-Only.drawio.png"><img loading="lazy" decoding="async" width="800" height="1024" src="/wp-content/uploads/2022/02/Azure-Hybrid-Network-VPN-GW-Only.drawio-800x1024.png" alt="" class="wp-image-3841" srcset="https://www.cloudcorner.gr/wp-content/uploads/2022/02/Azure-Hybrid-Network-VPN-GW-Only.drawio-800x1024.png 800w, https://www.cloudcorner.gr/wp-content/uploads/2022/02/Azure-Hybrid-Network-VPN-GW-Only.drawio-234x300.png 234w, https://www.cloudcorner.gr/wp-content/uploads/2022/02/Azure-Hybrid-Network-VPN-GW-Only.drawio-768x983.png 768w, https://www.cloudcorner.gr/wp-content/uploads/2022/02/Azure-Hybrid-Network-VPN-GW-Only.drawio.png 825w" sizes="auto, (max-width: 800px) 100vw, 800px" /></a></figure>



<p>References:<br><a href="https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns">Azure Private Endpoint DNS configuration | Microsoft Docs</a><br><a href="https://docs.microsoft.com/en-us/azure/dns/private-dns-virtual-network-links">What is a virtual network link subresource of Azure DNS private zones | Microsoft Docs</a><br><a href="https://docs.microsoft.com/en-us/azure/firewall/dns-details">Azure Firewall DNS Proxy details | Microsoft Docs</a><br><a href="https://docs.microsoft.com/en-us/azure/virtual-network/manage-route-table">Create, change, or delete an Azure route table | Microsoft Docs</a></p>
<div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author"><div class="saboxplugin-tab"><div class="saboxplugin-gravatar"><img loading="lazy" decoding="async" src="https://www.e-apostolidis.gr/wp-content/uploads/2019/05/mvpsummit2019.jpg" width="100"  height="100" alt="Pantelis Apostolidis" itemprop="image"></div><div class="saboxplugin-authorname"><a href="https://www.cloudcorner.gr/author/admin/" class="vcard author" rel="author"><span class="fn">Pantelis Apostolidis</span></a></div><div class="saboxplugin-desc"><div itemprop="description"><p>Pantelis Apostolidis is a Sr. Specialist, Azure at Microsoft and a former Microsoft Azure MVP. For the last 20 years, Pantelis has been involved to major cloud projects in Greece and abroad, helping companies to adopt and deploy cloud technologies, driving business value. He is entitled to a lot of Microsoft Expert Certifications, demonstrating his proven experience in delivering high quality solutions. He is an author, blogger and he is acting as a spokesperson for conferences, workshops and webinars. He is also an active member of several communities as a moderator in azureheads.gr and autoexec.gr. Follow him on Twitter @papostolidis.</p>
</div></div><div class="saboxplugin-web "><a href="https://www.cloudcorner.gr" target="_self" >www.cloudcorner.gr</a></div><div class="clearfix"></div><div class="saboxplugin-socials "><a title="Facebook" target="_blank" href="https://www.facebook.com/pantelis.apostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg></span></a><a title="Linkedin" target="_blank" href="https://www.linkedin.com/in/papostolidis/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-linkedin" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"></path></svg></span></a><a title="Instagram" target="_blank" href="https://www.instagram.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg></span></a><a title="Rss" target="_blank" href="https://wwwcloudcorner.gr/feed/rdf/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-rss" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"></path></svg></span></a><a title="Twitter" target="_blank" href="https://twitter.com/papostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" /></svg></span></a><a title="Github" target="_blank" href="https://github.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-github" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></span></a><a title="User email" target="_self" href="mailto:pr&#111;x&#105;magr&#064;&#104;ot&#109;&#097;&#105;l&#046;&#099;o&#109;" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-user_email" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg></span></a></div></div></div><p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure-routing-experiences-scenario-1%2F&amp;linkname=Azure%20Routing%20Experiences%20%7C%20Scenario%201" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_print" href="https://www.addtoany.com/add_to/print?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure-routing-experiences-scenario-1%2F&amp;linkname=Azure%20Routing%20Experiences%20%7C%20Scenario%201" title="Print" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure-routing-experiences-scenario-1%2F&#038;title=Azure%20Routing%20Experiences%20%7C%20Scenario%201" data-a2a-url="https://www.cloudcorner.gr/microsoft/azure-routing-experiences-scenario-1/" data-a2a-title="Azure Routing Experiences | Scenario 1"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://www.cloudcorner.gr/microsoft/azure-routing-experiences-scenario-1/">Azure Routing Experiences | Scenario 1</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cloudcorner.gr/microsoft/azure-routing-experiences-scenario-1/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
