{"id":24102,"date":"2025-02-24T09:44:35","date_gmt":"2025-02-24T09:44:35","guid":{"rendered":"https:\/\/aidanfinn.com\/?p=24102"},"modified":"2025-02-24T09:44:37","modified_gmt":"2025-02-24T09:44:37","slug":"routing-is-the-security-cabling-of-azure","status":"publish","type":"post","link":"https:\/\/aidanfinn.com\/?p=24102","title":{"rendered":"Routing Is The Security Cabling of Azure"},"content":{"rendered":"\n<p>In this post, I want to explain why routing is so important in Microsoft Azure. Without truly understanding routing, and implementing predictable and scaleable routing, you do not have a secure network. What one needs to understand is that routing is the security cabling of Azure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">My Favourite Interview Question<\/h2>\n\n\n\n<p>Now and then, I am asked to do a technical interview of a new candidate at my employer. I enjoy doing technical interviews because you get to have a deep tech chat with someone who is on their career journey. Sometimes is a hopeful youngster who is still new to the business but demonstrates an ability and a desire to learn &#8211; they&#8217;re a great find by the way. Sometimes its a veteran that you learn something from. And sometimes, they fall into the trap of discussing my favourite Azure topic: routing.<\/p>\n\n\n\n<p>Before I continue, I should warn potential interviewees that the thing I dislike most in a candidate is when they talk about things that &#8220;happened while I was there&#8221; and then they claim to be experts in that stuff.<\/p>\n\n\n\n<p>The candidate will say &#8220;I deployed a firewall in Azure&#8221;. The little demon on my shoulder says &#8220;ask them, ask them, ASK THEM!&#8221;. I can&#8217;t help myself &#8211; &#8220;How did you make traffic go through the firewall?&#8221;. The wrong answer here is: &#8220;it just did&#8221;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Visio Firewall Fallacy<\/h2>\n\n\n\n<p>I love diagrams like this <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/architecture\/reference-architectures\/dmz\/secure-vnet-dmz?tabs=portal\" target=\"_blank\" rel=\"noopener\" title=\"\">one<\/a>:<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"333\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-14-1024x333.png\" alt=\"\" class=\"wp-image-24110\" srcset=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-14-1024x333.png 1024w, https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-14-300x98.png 300w, https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-14-768x250.png 768w, https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-14.png 1112w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/figure>\n\n\n\n<p>Look at that beauty. You&#8217;ve got Azure networks in the middle (hub) and the right (spoke). And on the left is the remote network connected by some kind of site-to-site networking. The deployment even has the rarely used and pricey Network SKU of DDoS protection. Fantastic! Security is important!<\/p>\n\n\n\n<p>And to re-emphasise that security is important, the firewall (it doesn&#8217;t matter what brand you choose in this scenario) is slap-bang in the middle of the whole thing. Not only is that firewall important, but all traffic will have to go through it &#8211; nothing happens in that network without the firewall controlling it.<\/p>\n\n\n\n<p>Except, that the firewall is seeing absolutely no traffic at all.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Packets Route Directly From Source To Destination<\/h2>\n\n\n\n<p>At this point, I&#8217;d like you to (re-)read my post, <a href=\"https:\/\/aidanfinn.com\/?p=23991\" target=\"_blank\" rel=\"noopener\" title=\"\">Azure Virtual Networks Do Not Exist<\/a>. There I explained two things:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Everything is a VM in the platform, including NVA routers and Virtual Network Gateways (2 VMs).<\/li>\n\n\n\n<li>Packets always route directly from the source NIC to the destination NIC.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"421\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-2-1024x421.png\" alt=\"\" class=\"wp-image-24009\" srcset=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-2-1024x421.png 1024w, https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-2-300x123.png 300w, https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-2-768x316.png 768w, https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-2-1200x494.png 1200w, https:\/\/aidanfinn.com\/wp-content\/uploads\/2025\/02\/image-2.png 1286w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/figure>\n\n\n\n<p>In our above firewall scenario, let&#8217;s consider two routes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Traffic from a client in the remote site to an Azure service in the spoke.<\/li>\n\n\n\n<li>A response from the service in the Azure spoke to the client in the remote site.<\/li>\n<\/ul>\n\n\n\n<p>The client sends traffic from the remote site across the site-to-site connection. The physical part of that network is the familiar flow that you&#8217;d see in tracert. Things change once that packet hits Azure. The site-to-site connection terminates in the NVA\/virtual network gateway. Now the packet needs to route to the service in the spoke. The scenario is that the NVA\/virtual network gateway is the source (in Azure networking) and the spoke service is the destination. The packet leaves the NIC of the NVA\/virtual network and routes directly (via the underlying physical Azure network) directly to the NIC of one of the load-balanced VMs in the spoke. The packet did not route through the firewall. The packet did not go through a default gateway. The packet did not go across some virtual peering wire. Repeat it after me:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Packets route directly from source to destination.<\/p>\n<\/blockquote>\n\n\n\n<p>Now for the response. The VM in the spoke is going to send a response. Where will that response go? You might say &#8220;The firewall is in the middle of the diagram, Aidan. It&#8217;s obvious!&#8221;.  Remember:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Packets route directly from source to destination.<\/p>\n<\/blockquote>\n\n\n\n<p>In this scenario, the destination is the NVA\/virtual network gateway. The packet will leave the VM in the spoke and appear in the NIC of the NCA\/virtual network gateway.<\/p>\n\n\n\n<p>It doesn&#8217;t matter how pretty your Visio is (<a href=\"https:\/\/www.drawio.com\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Draw.io<\/a> is a million times better, by the way &#8211; thanks for the tip, Haakon). It doesn&#8217;t matter what your intention was. Packets &#8230; route directly from source to destination.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">User-Defined Routes &#8211; Right?<\/h2>\n\n\n\n<p>You might be saying, &#8220;Duh, Aidan, User-Defined Routes (UDRs) in Route Tables will solve this&#8221;. You&#8217;re sort of on the right track &#8211; maybe even mostly there. But I know from talking to many people over the years, that they completely overlook that there are two (I&#8217;d argue three) other sources of routes in Azure. Those other routes are playing a role here that you&#8217;re not appreciating and if you do not configure your UDRs\/Route Tables correctly you&#8217;ll either change nothing or break your network.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Routing Is The Security Cabling of Azure<\/h2>\n\n\n\n<p>In the on-premises world, we use cables to connect network appliances. You can&#8217;t get from one top-of-rack switch\/VLAN to another without going through a default gateway. That default gateway can be a switch, a switch core, a router, or a firewall. Connections are made possible via cables. Just like water flow is controlled by pipes, packets can only transit cables that you lay down.<\/p>\n\n\n\n<p>If you read my <a href=\"https:\/\/aidanfinn.com\/?p=23991\" target=\"_blank\" rel=\"noopener\" title=\"\">Azure Virtual Networks Do Not Exist<\/a> post then you should understand that NICs in a VNet or in peered VNets are a mesh of NICs that can route directly to each other. There is no virtual network cabling; this means that we need to control the flows via some other means and that means is routing.<\/p>\n\n\n\n<p>One must understand the end state, how routing works, and how to manipulate routing to end up in the desired end state. That&#8217;s the obvious bit &#8211; but often overlooked is that the resulting security model should be scaleable, manageable, and predictable.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, I want to explain why routing is so important in Microsoft Azure. Without truly understanding routing, and implementing predictable and scaleable routing, you do not have a secure network. What one needs to understand is that routing is the security cabling of Azure. My Favourite Interview Question Now and then, I am &hellip; <a href=\"https:\/\/aidanfinn.com\/?p=24102\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Routing Is The Security Cabling of Azure&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":18983,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[5],"tags":[170,242,324,326,289,281],"class_list":["post-24102","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-azure","tag-firewall","tag-routing","tag-user-defined-routing","tag-virtual-network","tag-vnet"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/09\/73014722_47abcbcc7f_z_d1.jpg","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/24102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24102"}],"version-history":[{"count":20,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/24102\/revisions"}],"predecessor-version":[{"id":24123,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/24102\/revisions\/24123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/media\/18983"}],"wp:attachment":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}