<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abhishek Kadlii</title>
    <description>The latest articles on DEV Community by Abhishek Kadlii (@abhishek_kadlii_9ef4ca8bc).</description>
    <link>https://dev.to/abhishek_kadlii_9ef4ca8bc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3945536%2F543d54c3-f3c9-49ba-b4c1-f9d22f89ec15.jpg</url>
      <title>DEV Community: Abhishek Kadlii</title>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhishek_kadlii_9ef4ca8bc"/>
    <language>en</language>
    <item>
      <title>Finding the Needle in the Cloud Haystack: Real-Time Observability &amp; Log Diagnostics with KQL</title>
      <dc:creator>Abhishek Kadlii</dc:creator>
      <pubDate>Fri, 18 Sep 2026 10:45:06 +0000</pubDate>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc/finding-the-needle-in-the-cloud-haystack-real-time-observability-log-diagnostics-with-kql-328j</link>
      <guid>https://dev.to/abhishek_kadlii_9ef4ca8bc/finding-the-needle-in-the-cloud-haystack-real-time-observability-log-diagnostics-with-kql-328j</guid>
      <description>&lt;h1&gt;
  
  
  Finding the Needle in the Cloud Haystack: Real-Time Observability &amp;amp; Log Diagnostics with KQL
&lt;/h1&gt;

&lt;p&gt;When an enterprise cloud application drops database transactions or encounters severe latency spikes across active availability zones, relying on legacy operational methods—like opening manual terminal sessions to SSH into individual virtual machines one by one to comb through raw flat-text log files—is an infrastructure failure. It wastes critical troubleshooting hours and drastically inflates your Mean Time to Resolution (MTTR).&lt;/p&gt;

&lt;p&gt;To establish real-time operational velocity, I engineered a centralized cloud observability perimeter. By aggregating distributed data-plane streams into a high-capacity &lt;strong&gt;Azure Log Analytics Workspace&lt;/strong&gt; and configuring the native &lt;strong&gt;Azure Monitor Agent (AMA)&lt;/strong&gt; extension pipeline, I developed advanced &lt;strong&gt;Kusto Query Language (KQL)&lt;/strong&gt; diagnostic matrices to automatically isolate hardware stress vectors, audit security compromises, and wire them up to an automated alert engine.&lt;/p&gt;




&lt;h3&gt;
  
  
  🏰 The Analogy: The Building CCTV Control Room
&lt;/h3&gt;

&lt;p&gt;To appreciate the structural value of a centralized telemetry workspace, look at how facility protection maps out in a physical corporate skyscraper:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Manual Incident Diagnostics (The Flashlight Search):&lt;/strong&gt; Walking through a massive 50-story commercial office building, manually opening every single individual storage room and office suite door one by one with a handheld flashlight to search for a single failed lightbulb.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Centralized Observability (The System Video Wall):&lt;/strong&gt; Sitting inside a high-tech facility security control room equipped with a unified central video display. The monitoring array instantly flags the exact malfunctioning office room, graphs the precise real-time electrical voltage drop value, and routes an automated incident notice directly to the on-call engineer's mobile device.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Central India VM Node 1 ] ──┐
[ Core Compute Engine VM  ] ──┼──► [ Log Analytics Workspace ] ──► (KQL Engine) ──► [ Automated Email Alert ]
[ Infrastructure Node 3   ] ──┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🛠️ The Step-by-Step Command-Line Execution Blueprint
&lt;/h3&gt;

&lt;p&gt;The telemetry data collection and query analysis perimeter was deployed inside the &lt;strong&gt;Central India&lt;/strong&gt; datacenter region using the Azure CLI:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Provisioning the Cloud Monitoring Sandbox Workspace
&lt;/h4&gt;

&lt;p&gt;First, I initialized an isolated resource group container and spun up the primary big data logging storage cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Initialize the tracking resource group container in Central India&lt;/span&gt;
az group create &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Monitoring_India_RG"&lt;/span&gt; &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="s2"&gt;"centralindia"&lt;/span&gt;

&lt;span class="c"&gt;# Deploy the high-capacity central Log Analytics Workspace cluster&lt;/span&gt;
az monitor log-analytics workspace create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Monitoring_India_RG"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--workspace-name&lt;/span&gt; &lt;span class="s2"&gt;"CentralOpsWorkspaceIndia"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="s2"&gt;"centralindia"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. Deploying the Ingestion Fleet via Azure Monitor Agent (AMA)
&lt;/h4&gt;

&lt;p&gt;Next, I provisioned an approved workload generator node and connected its internal diagnostic engine straight to our central logging workspace using the operational Linux collection agent extension:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Provision an approved compute host inside the local group boundary&lt;/span&gt;
az vm create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Monitoring_India_RG"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"Hub-Mgmt-VM"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--image&lt;/span&gt; &lt;span class="s2"&gt;"Ubuntu2204"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--size&lt;/span&gt; &lt;span class="s2"&gt;"Standard_B2ats_v2"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="s2"&gt;"centralindia"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--admin-username&lt;/span&gt; &lt;span class="s2"&gt;"abhishek"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--generate-ssh-keys&lt;/span&gt;

&lt;span class="c"&gt;# Bind the operational Linux collection agent extension to stream metrics&lt;/span&gt;
az vm extension &lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Monitoring_India_RG"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--vm-name&lt;/span&gt; &lt;span class="s2"&gt;"Hub-Mgmt-VM"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"AzureMonitorLinuxAgent"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--publisher&lt;/span&gt; &lt;span class="s2"&gt;"Microsoft.Azure.Monitor"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;📊 Lab Verification Artifact 1: Infrastructure Deployment Status&lt;/strong&gt;&lt;br&gt;
Below is the successful live control plane verification output proving our tracking asset bypasses policy blocks and runs actively in production:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2lvn3s98msu65y326js.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2lvn3s98msu65y326js.png" alt=" " width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  3. Engineering the Automated Proactive Alerting Perimeter
&lt;/h4&gt;

&lt;p&gt;To shift from reactive analysis to proactive mitigation, I configured a corporate Action Group tied directly to an automated metric threshold alert rule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Register the automated corporate Action Group communication channel&lt;/span&gt;
az monitor action-group create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Monitoring_India_RG"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"OpsAlertsGroup"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--short-name&lt;/span&gt; &lt;span class="s2"&gt;"OpsAlerts"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--action&lt;/span&gt; email &lt;span class="s2"&gt;"AzureAdmin"&lt;/span&gt; &lt;span class="s2"&gt;"sukithaagowda31@outlook.com"&lt;/span&gt;

&lt;span class="c"&gt;# Extract the live virtual machine resource identification token string&lt;/span&gt;
&lt;span class="nv"&gt;VM_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;az vm show &lt;span class="nt"&gt;--resource-group&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Monitoring_India_RG"&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"Hub-Mgmt-VM"&lt;/span&gt; &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; tsv&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# Bind the metric alert threshold rule live to evaluate system stress over a 5m window&lt;/span&gt;
az monitor metrics alert create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Monitoring_India_RG"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"High_CPU_Alert_Rule"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--scopes&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$VM_ID&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--condition&lt;/span&gt; &lt;span class="s2"&gt;"avg Percentage CPU &amp;gt; 85"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--description&lt;/span&gt; &lt;span class="s2"&gt;"Triggers an automated notice when CPU performance thresholds cross 85 percent over a 5-minute window."&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--evaluation-frequency&lt;/span&gt; &lt;span class="s2"&gt;"1m"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--window-size&lt;/span&gt; &lt;span class="s2"&gt;"5m"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--action&lt;/span&gt; &lt;span class="s2"&gt;"OpsAlertsGroup"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;📊 Lab Verification Artifact 2: Automated Alert Rule Architecture&lt;/strong&gt;&lt;br&gt;
Visual proof showing our active threshold metric criteria parameters successfully bound to the Azure Action Group mapping plane:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgmqzljoroknntpqogqu3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgmqzljoroknntpqogqu3.png" alt=" " width="799" height="411"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  ⚙️ Production Kusto Query Language (KQL) Diagnostic Matrix
&lt;/h3&gt;

&lt;p&gt;Once telemetry arrays began populating our central workspace datastores, I built production-grade KQL routines to parse system behavior trends and isolate hidden engineering anomalies:&lt;/p&gt;

&lt;h4&gt;
  
  
  🔍 Scenario 1: Pinpointing Elevated Compute Strain (&amp;gt; 80% CPU)
&lt;/h4&gt;

&lt;p&gt;This analytical monitoring script continuously filters through high-frequency processor telemetry counters (&lt;code&gt;Perf&lt;/code&gt;), packages historical data records into clean 5-minute aggregation buckets (&lt;code&gt;bin&lt;/code&gt;), averages out processing values, and structures trends by the highest strain peaks to surface hardware degradation instantly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Perf
| where ObjectName == "Processor" and CounterName == "% Processor Time"
| where CounterValue &amp;gt; 80
| summarize AvgCPU = avg(CounterValue) by Computer, bin(TimeGenerated, 5m)
| order by TimeGenerated desc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  🔍 Scenario 2: Auditing Rogue Host Authentication Failures
&lt;/h4&gt;

&lt;p&gt;This security compliance routine tracks raw server operating logs (&lt;code&gt;Syslog&lt;/code&gt;), filtering specifically for internal authentication facilities (&lt;code&gt;auth&lt;/code&gt;) that record failed password entries. It uses regular expressions (&lt;code&gt;regex&lt;/code&gt;) to rip the hostile actor's source IP address straight out of unformatted text strings into its own auditable field for immediate firewall blocking:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syslog
| where Facility == "auth" and SyslogMessage contains "Failed password"
| summarize FailedAttempts = count() by HostName, SourceIP = extract(@"\d+\.\d+\.\d+\.\d+", 0, SyslogMessage)
| order by FailedAttempts desc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🚙 KQL Code Logic Decoder (In Plain, Simple Words)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;KQL Structural Keyword&lt;/th&gt;
&lt;th&gt;Tactical Operational Purpose&lt;/th&gt;
&lt;th&gt;Plain-English Logic Translation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;Perf / Syslog&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dynamic Data Table Targeting&lt;/td&gt;
&lt;td&gt;Tells the query engine which database storage table to read from first.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;bin(TimeGenerated, 5m)&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Telemetry Window Aggregation&lt;/td&gt;
&lt;td&gt;Chops the messy time stream into neat, summarized 5-minute buckets.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;extract()&lt;/code&gt; / Regex&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Log Pattern Interception&lt;/td&gt;
&lt;td&gt;Rips out values (like raw hacker IP addresses) out of messy text lines.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;summarize count()&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Aggregate Event Profiling&lt;/td&gt;
&lt;td&gt;Math engine that groups and sums metrics by computer or host identifier strings.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  📓 The TAC Engineer's Troubleshooting Journal
&lt;/h3&gt;

&lt;p&gt;Real infrastructure tracks in production introduce complex cascading errors. Resolving these blockers requires structural troubleshooting discipline:&lt;/p&gt;

&lt;h4&gt;
  
  
  🚨 1. Subscription Governance Interception Block (&lt;code&gt;Code: RequestDisallowedByPolicy&lt;/code&gt;)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Challenge:&lt;/strong&gt; Initial attempts to stand up the log generator host (&lt;code&gt;az vm create&lt;/code&gt;) crashed with a fatal pre-flight API block indicating policy constraints were breached.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Root Cause:&lt;/strong&gt; Prior architectural tracks implemented a broad subscription-wide policy restricting VM shapes to low-cost configurations (&lt;code&gt;Standard_B2s&lt;/code&gt; or &lt;code&gt;Standard_B2ats_v2&lt;/code&gt;). Attempting a standard &lt;code&gt;Standard_B1s&lt;/code&gt; test deployment breached this rule, triggering an immediate gate block.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Fix:&lt;/strong&gt; Changed the CLI hardware argument explicitly to an approved whitelisted shape (&lt;code&gt;--size Standard_B2ats_v2&lt;/code&gt;), matching global tenant governance rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🚨 2. Cross-Region Datacenter Capacity Exhaustion (&lt;code&gt;Code: SkuNotAvailable&lt;/code&gt;)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Challenge:&lt;/strong&gt; The adjusted VM build failed a second time inside the Singapore (&lt;code&gt;southeastasia&lt;/code&gt;) datacenter, throwing an active capacity restriction error.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Root Cause:&lt;/strong&gt; High computing resource usage across Southeast Asia fully exhausted the physical datacenter hardware frames for both whitelisted B-series shapes simultaneously.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Fix:&lt;/strong&gt; Migrated the deployment target room entirely to the Central India region (&lt;code&gt;centralindia&lt;/code&gt;), accessing open computing clusters while remaining inside subscription policy bounds.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;📊 Lab Verification Artifact 3: Multi-Region Datacenter Capacity Deficit&lt;/strong&gt;&lt;br&gt;
Live terminal capture showcasing the data plane capacity gridlock on B-series resource nodes across standard regional landing zones:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2w36bodktynqltnu0km6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2w36bodktynqltnu0km6.png" alt=" " width="799" height="349"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;💡 Top Takeaways for the AZ-104 Exam &amp;amp; Monitoring Architecture&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Data Collection Rules (DCR): Aggregating continuous data-plane streams can inflate ingestion costs. In enterprise setups, deploying targeted Data Collection Rules to filter out verbose system events before they reach storage tables preserves credit profiles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Metric Alert Threshold Actions: Marrying programmatic KQL conditions to automated Azure Alert Rules allows organizations to bind metrics directly to Azure Action Groups, instantly triggering email responses or execution webhooks when production tolerances are breached.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>azure</category>
      <category>monitoring</category>
      <category>cloudsecurity</category>
      <category>devops</category>
    </item>
    <item>
      <title>Stopping Rogue Deployments: How I Programmed Azure API Guardrails to Protect the Cloud Wallet</title>
      <dc:creator>Abhishek Kadlii</dc:creator>
      <pubDate>Fri, 18 Sep 2026 09:49:58 +0000</pubDate>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc/stopping-rogue-deployments-how-i-programmed-azure-api-guardrails-to-protect-the-cloud-wallet-340m</link>
      <guid>https://dev.to/abhishek_kadlii_9ef4ca8bc/stopping-rogue-deployments-how-i-programmed-azure-api-guardrails-to-protect-the-cloud-wallet-340m</guid>
      <description>&lt;p&gt;Every cloud architect knows the sudden wave of anxiety that comes with opening a billing dashboard and seeing an unexpected cost spike. In large enterprise environments, these spikes rarely happen due to malicious attacks—they happen due to human error. A junior developer spinning up a high-performance compute or GPU node for a minor test case and forgetting to deprovision it over the weekend can vaporize a sandbox budget in hours.&lt;/p&gt;

&lt;p&gt;Instead of relying on warning emails, training manuals, or reactive cleanup scripts, I stepped up as a DevSecOps engineer to solve this problem at the source. I programmed the &lt;strong&gt;Azure Resource Manager (ARM) API gateway&lt;/strong&gt; itself to automatically intercept and decline unauthorized resource allocations using &lt;strong&gt;Azure Policy&lt;/strong&gt; and &lt;strong&gt;Custom RBAC Least-Privilege roles&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  🏰 The Analogy: The Bouncing Corporate Credit Card
&lt;/h3&gt;

&lt;p&gt;To understand this architecture, look at how corporate spending is managed in the physical world:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Weak Setup (The Honor System):&lt;/strong&gt; Handing a corporate credit card with a ₹5,00,000 limit to an employee, giving them a policy handbook, and hoping they do not buy a luxury watch. If they make a mistake, the money is already gone, and you are left doing damage control.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Guardrail Setup (The Terminal Lock):&lt;/strong&gt; Programming the payment terminal directly at the cash register. If the employee attempts to swipe the card for anything outside approved inventory codes or locations, the transaction is forcefully declined on the spot before a single rupee leaves the corporate account.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                               ┌──► [ Approved SKU: B-Series Only ] ──► ✅ ALLOWED (Passes Gate)
                               │
[ Deployment Request ] ──► [ Azure Policy ARM Gate ]
                               │
                               └──► [ Prohibited SKU: D-Series Node ] ──► ❌ DENIED (Declined at Register)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🛠️ The Step-by-Step Command-Line Execution Blueprint
&lt;/h3&gt;

&lt;p&gt;To demonstrate a production-grade governance implementation, I configured the deployment ring via the Azure CLI inside the &lt;strong&gt;Southeast Asia&lt;/strong&gt; datacenter region using an isolated sandbox perimeter scope:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Designing the Custom Policy Criteria (&lt;code&gt;allowed-skus.json&lt;/code&gt;)
&lt;/h4&gt;

&lt;p&gt;I engineered a strict JSON rule block that targets virtual machine resources, setting the active evaluation flag to a forceful &lt;code&gt;deny&lt;/code&gt; effect if the requested hardware profile falls outside of approved low-cost shapes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"if"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"allOf"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"field"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"equals"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Microsoft.Compute/virtualMachines"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"field"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Microsoft.Compute/virtualMachines/sku.name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"notIn"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"Standard_B1s"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"Standard_B2ats_v2"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"then"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"deny"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. Provisioning and Binding the Policy Scope
&lt;/h4&gt;

&lt;p&gt;I initialized the baseline target resource group perimeter and registered the schema with the control plane, passing metadata parameters as explicit flags to satisfy the Azure CLI parser rules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Initialize the target perimeter container&lt;/span&gt;
az group create &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Lab_RG"&lt;/span&gt; &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="s2"&gt;"southeastasia"&lt;/span&gt;

&lt;span class="c"&gt;# Register the core custom definition rule container&lt;/span&gt;
az policy definition create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"restrict-vm-skus"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--display-name&lt;/span&gt; &lt;span class="s2"&gt;"Restrict VM SKUs to B-Series"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--rules&lt;/span&gt; allowed-skus.json &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--mode&lt;/span&gt; &lt;span class="s2"&gt;"Indexed"&lt;/span&gt;

&lt;span class="c"&gt;# Assign the policy enforcer live to the specific Resource Group scope&lt;/span&gt;
az policy assignment create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"Enforce_B_Series_Only"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--policy&lt;/span&gt; &lt;span class="s2"&gt;"restrict-vm-skus"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--display-name&lt;/span&gt; &lt;span class="s2"&gt;"Enforce B-Series Only"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Lab_RG"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  ⚙️ Forging a Custom Least-Privilege RBAC Identity Role
&lt;/h3&gt;

&lt;p&gt;Governance is incomplete without identity isolation. Instead of granting wide open contributor rights, I constructed a tailored JSON permission schema (&lt;code&gt;vm-operator-role.json&lt;/code&gt;) defining a custom &lt;strong&gt;&lt;code&gt;VM Restart Operator&lt;/code&gt;&lt;/strong&gt; role. This role explicitly limits identity capabilities to virtual machine visibility and reboot actions, leaving write actions, configurations changes, and resource deletions sealed shut.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"VM Restart Operator"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"IsCustom"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Can only read and restart virtual machines inside the environment."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Microsoft.Compute/virtualMachines/read"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Microsoft.Compute/virtualMachines/restart/action"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"NotActions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"AssignableScopes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"/subscriptions/YOUR_SUBSCRIPTION_ID"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I programmatically extracted the subscription context and registered the custom RBAC identity blueprint live with the Azure identity control plane API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Dynamically fetch current active subscription ID text string&lt;/span&gt;
&lt;span class="nv"&gt;SUB_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;az account show &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; tsv&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# Inject the active subscription path into our assignable scopes payload&lt;/span&gt;
&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"s|YOUR_SUBSCRIPTION_ID|&lt;/span&gt;&lt;span class="nv"&gt;$SUB_ID&lt;/span&gt;&lt;span class="s2"&gt;|g"&lt;/span&gt; vm-operator-role.json

&lt;span class="c"&gt;# Register the custom RBAC identity blueprint live in the active directory tenant&lt;/span&gt;
az role definition create &lt;span class="nt"&gt;--role-definition&lt;/span&gt; vm-operator-role.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  📓 The TAC Engineer's Troubleshooting Journal
&lt;/h3&gt;

&lt;p&gt;Engineering in production means breaking things and solving real conflicts. During this implementation lab, I ran into two distinct runtime errors that provided vital architectural insights:&lt;/p&gt;

&lt;h4&gt;
  
  
  🚨 1. Top-Level Schema Mismatch Failures (&lt;code&gt;Code: InvalidPolicyRule&lt;/code&gt;)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Challenge:&lt;/strong&gt; The initial registration utility rejected the code payload, throwing a fatal syntax validation error pointing to a schema failure on the &lt;code&gt;"properties"&lt;/code&gt; and &lt;code&gt;"mode"&lt;/code&gt; parameters.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Root Cause:&lt;/strong&gt; The &lt;code&gt;az policy definition create&lt;/code&gt; engine expects the underlying &lt;code&gt;--rules&lt;/code&gt; file configuration to start directly with the structural logic parameters (&lt;code&gt;if&lt;/code&gt; and &lt;code&gt;then&lt;/code&gt;). Wrapping these keys in metadata tags violates the parser's expected payload format.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Fix:&lt;/strong&gt; Stripped the outer property layers out of the &lt;code&gt;allowed-skus.json&lt;/code&gt; file completely, and passed meta properties like &lt;code&gt;--mode "Indexed"&lt;/code&gt; out to explicit command-line flags.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🚨 2. Scope Binding Failures via Missing Context Containers (&lt;code&gt;Code: ResourceGroupNotFound&lt;/code&gt;)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The Challenge:&lt;/strong&gt; The policy assignment mapping crashed, returning a terminal exception indicating that the target resource group room could not be found.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Root Cause:&lt;/strong&gt; Strict cost-control practices dictate tearing down all sandbox groups immediately after structural validations. Running an active policy assignment against an environment scope that doesn't exist crashes the engine call.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Fix:&lt;/strong&gt; Refactored the command execution queue to explicitly guarantee the presence of the resource group container (&lt;code&gt;az group create&lt;/code&gt;) &lt;em&gt;before&lt;/em&gt; executing assignment mappings.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🚀 Live Workload Validation: The RequestDisallowedByPolicy Block
&lt;/h3&gt;

&lt;p&gt;To prove the automated guardrails work perfectly under load, I simulated an accidental budget breach by forcing a deployment command for an unauthorized, high-tier enterprise instance shape (&lt;code&gt;Standard_D4s_v3&lt;/code&gt;) directly against the protected resource group perimeter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az vm create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; &lt;span class="s2"&gt;"Marathahalli_Lab_RG"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"Rogue_VM"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--image&lt;/span&gt; &lt;span class="s2"&gt;"Ubuntu2204"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--size&lt;/span&gt; &lt;span class="s2"&gt;"Standard_D4s_v3"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--admin-username&lt;/span&gt; &lt;span class="s2"&gt;"abhishek"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--generate-ssh-keys&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  📸 Defensive Proof Point: The Wallet Secured
&lt;/h4&gt;

&lt;p&gt;The deployment call spun for a brief moment, hit the ARM API gateway checkpoint, evaluated against the active assignment metadata constraints, and was violently rejected! The core control plane blocked resource generation immediately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;azure.core.exceptions.HttpResponseError: (InvalidTemplateDeployment) The template deployment failed because of policy violation. 
Code: InvalidTemplateDeployment
Message: The template deployment failed because of policy violation. Please see details for more information.

Exception Details: (RequestDisallowedByPolicy) Resource 'Rogue_VM' was disallowed by policy 'Enforce_B_Series_Only'.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftkp1wj7ub48c0yoq72gf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftkp1wj7ub48c0yoq72gf.png" alt=" " width="799" height="486"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  💡 Core FinOps &amp;amp; AZ-104 Exam Lessons Learned
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Deny vs. Audit Effects:&lt;/strong&gt; The &lt;code&gt;deny&lt;/code&gt; effect completely halts non-compliant resource allocation at the gate, protecting the budget instantly. The &lt;code&gt;audit&lt;/code&gt; effect, conversely, allows deployments to succeed but flags them inside a compliance dashboard—ideal for mapping out production estates without creating application downtime risks.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;RBAC Scoping Precision:&lt;/strong&gt; Security parameters inside custom role definitions require pinpoint precision. Explicitly matching actions to granular tasks ensures teams maintain access velocity without breaking zero-trust boundaries.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>azure</category>
      <category>cloudsecurity</category>
      <category>az104</category>
      <category>devsecops</category>
    </item>
    <item>
      <title># 🚀 The Self-Healing Server Fleet: How I Mastered Automation, Beat Global SKU Crushes, and Solved Azure's Cloud Racing Conditions</title>
      <dc:creator>Abhishek Kadlii</dc:creator>
      <pubDate>Thu, 17 Sep 2026 09:29:25 +0000</pubDate>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc/-the-self-healing-server-fleet-how-i-mastered-automation-beat-global-sku-crushes-and-solved-5d8</link>
      <guid>https://dev.to/abhishek_kadlii_9ef4ca8bc/-the-self-healing-server-fleet-how-i-mastered-automation-beat-global-sku-crushes-and-solved-5d8</guid>
      <description>&lt;p&gt;Every network engineer knows the absolute dread of the "Black Friday Surge." Imagine a popular grocery store on a festival weekend. There is only one cashier working the register. Suddenly, a bus drops off 100 hungry customers. The line backs up, the cashier is overwhelmed, and the store grinds to a complete halt. &lt;/p&gt;

&lt;p&gt;In traditional infrastructure, fixing this meant buying another expensive physical server, mounting it in a rack, and wiring it manually—hours or days too late.&lt;/p&gt;

&lt;p&gt;Today, I engineered an automated, self-healing server fleet using an &lt;strong&gt;Azure Virtual Machine Scale Set (VMSS)&lt;/strong&gt; under &lt;strong&gt;Uniform Orchestration Mode&lt;/strong&gt; backed by an automatic metric sensor. When a traffic surge hits, the cloud instantly detects the load and spawns identical backup server instances completely on its own.&lt;/p&gt;




&lt;h3&gt;
  
  
  🏰 The Analogy: The Overworked Cashier vs. The Automated Queue
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Static State (1 Node):&lt;/strong&gt; You have a single server running your application. When traffic spikes, CPU utilization hits 100%, packets get dropped, and your users experience timeouts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Automated State (Scale-Out Fleet):&lt;/strong&gt; You program a metric sensor to monitor the workload. The moment the average CPU capacity crosses a 70% threshold, the platform dynamically provisions a second identical node behind an Azure Load Balancer to distribute the weight.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                                    ┌──► [ Active Server Node 01 ] (CPU Spikes &amp;gt;70%)
                                    │
[ High Traffic Crowds ] ──► [ Load Balancer ]
                                    │
                                    └──► 🚀 (Autoscale Rules Trigger Spawn) ──► [ Active Server Node 02 ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🛠️ The Fault-Tolerant Implementation Blueprint
&lt;/h3&gt;

&lt;p&gt;To ensure absolute environment control, I deployed the high-availability compute architecture directly inside the &lt;strong&gt;Central India&lt;/strong&gt; data center region using the Azure CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Spin up the dedicated lab container&lt;/span&gt;
az group create &lt;span class="nt"&gt;--name&lt;/span&gt; Marathahalli_Lab_RG_V2 &lt;span class="nt"&gt;--location&lt;/span&gt; centralindia

&lt;span class="c"&gt;# 2. Build the production network foundation and application subnet&lt;/span&gt;
az network vnet create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; Marathahalli_Lab_RG_V2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--location&lt;/span&gt; centralindia &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--address-prefixes&lt;/span&gt; 10.0.0.0/16 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--subnet-name&lt;/span&gt; Prod_App_Subnet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--subnet-prefixes&lt;/span&gt; 10.0.2.0/24

&lt;span class="c"&gt;# 3. Deploy the Uniform High-Availability Virtual Machine Scale Set fleet&lt;/span&gt;
az vmss create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; Marathahalli_Lab_RG_V2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; WebAppVMSS &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--location&lt;/span&gt; centralindia &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--image&lt;/span&gt; Ubuntu2204 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--vm-sku&lt;/span&gt; Standard_D2s_v5 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--instance-count&lt;/span&gt; 1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--vnet-name&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--subnet&lt;/span&gt; Prod_App_Subnet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--lb&lt;/span&gt; WebAppLB &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--backend-pool-name&lt;/span&gt; WebAppBackendPool &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--orchestration-mode&lt;/span&gt; Uniform &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--admin-username&lt;/span&gt; abhishek &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--generate-ssh-keys&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  📸 Proof Point 1: Baseline Deployment Established
&lt;/h4&gt;

&lt;p&gt;Here is the verification screen in the Azure Portal showing our high-availability fleet initialized with exactly &lt;strong&gt;1 baseline active instance&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F658hzc4klfwill9giqv8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F658hzc4klfwill9giqv8.png" alt=" " width="799" height="357"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ⚙️ Programming the Metrics Sensor (Autoscale Policies)
&lt;/h3&gt;

&lt;p&gt;Next, I programmed the metric sensor logic to track the infrastructure and scale out by 1 instance if the average CPU exceeds 70% for a brief 3-minute aggregation window:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 4. Initialize the Autoscale Profile Container&lt;/span&gt;
az monitor autoscale create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; Marathahalli_Lab_RG_V2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource&lt;/span&gt; WebAppVMSS &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-type&lt;/span&gt; Microsoft.Compute/virtualMachineScaleSets &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; CPU_Autoscale_Policy &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--min-count&lt;/span&gt; 1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--max-count&lt;/span&gt; 3 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--count&lt;/span&gt; 1

&lt;span class="c"&gt;# 5. Inject the Automatic Scale-Out Trigger rule logic&lt;/span&gt;
az monitor autoscale rule create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; Marathahalli_Lab_RG_V2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--autoscale-name&lt;/span&gt; CPU_Autoscale_Policy &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--scale&lt;/span&gt; out 1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--condition&lt;/span&gt; &lt;span class="s2"&gt;"Percentage CPU &amp;gt; 70 avg 3m"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  📸 Proof Point 2: Visual Metric Sensor Configured
&lt;/h4&gt;

&lt;p&gt;This screenshot inside the &lt;strong&gt;Availability + scale&lt;/strong&gt; rules dashboard shows our metric collection rules are armed, active, and tracking the fleet:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frzg1tslt4vqju0di8jyu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frzg1tslt4vqju0di8jyu.png" alt=" " width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  📓 The TAC Engineer's Troubleshooting Journal: 3 Massive Roadblocks Solved
&lt;/h3&gt;

&lt;p&gt;This project was a massive lesson in cloud operations. Here are the three production-grade engineering blocks I faced and how I engineered around them:&lt;/p&gt;

&lt;h4&gt;
  
  
  🚨 Block 1: The Global SKU Capacity Crunch (&lt;code&gt;Code: SkuNotAvailable&lt;/code&gt;)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Challenge:&lt;/strong&gt; My initial deployment targets (&lt;code&gt;Standard_B2s&lt;/code&gt; and &lt;code&gt;Standard_B2s&lt;/code&gt;) failed preflight checks across multiple data center regions due to strict free-trial resource pool capacity restrictions enforced by Azure during regional peak traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Resolution:&lt;/strong&gt; I pivoted the architecture parameters to use &lt;strong&gt;&lt;code&gt;Standard_D2s_v5&lt;/code&gt;&lt;/strong&gt;—a mainstream enterprise-grade tier shape. Azure maintains deep hardware capacity pools for this size, allowing the fleet to provision cleanly on the very first try.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🚨 Block 2: Hostname Syntax Validation Fault (&lt;code&gt;Code: InvalidHostNamePrefix&lt;/code&gt;)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Challenge:&lt;/strong&gt; My scale set name originally contained underscores (&lt;code&gt;WebApp_VMSS&lt;/code&gt;). Linux operating systems strictly forbid underscore characters inside virtual computer hostnames, causing Azure's orchestration manager to drop the deployment at the gate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Resolution:&lt;/strong&gt; I refactored the infrastructure naming convention completely to use clean &lt;strong&gt;CamelCase&lt;/strong&gt; formatting (&lt;code&gt;WebAppVMSS&lt;/code&gt;), passing validation instantly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🚨 Block 3: The Deprovisioning Cloud Racing Condition (&lt;code&gt;Code: ResourceGroupBeingDeleted&lt;/code&gt;)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Challenge:&lt;/strong&gt; While rebuilding my lab, I issued a resource teardown command. Because I used the &lt;code&gt;--no-wait&lt;/code&gt; flag, Azure's background deletion thread was still clearing out old network paths. When my new script immediately tried to claim the network domain, it crashed because the resource group container was locked in a deprovisioning state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Resolution:&lt;/strong&gt; I bypassed the locks seamlessly by appending &lt;strong&gt;&lt;code&gt;_V2&lt;/code&gt;&lt;/strong&gt; to my Resource Group parameters, creating a brand new isolated deployment space instantly without sitting around waiting for background processes to clean up.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🚀 Live Workload Stress Simulation &amp;amp; Validation
&lt;/h3&gt;

&lt;p&gt;To test the resilience of the architecture without worrying about external firewall rules or load balancer SSH blocks, I leveraged Azure's global &lt;strong&gt;Run Command infrastructure&lt;/strong&gt; to trigger a synthetic traffic spike directly inside the running compute node:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az vmss run-command invoke &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource-group&lt;/span&gt; Marathahalli_Lab_RG_V2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; WebAppVMSS &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--instance-id&lt;/span&gt; 0 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--command-id&lt;/span&gt; RunShellScript &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--scripts&lt;/span&gt; &lt;span class="s2"&gt;"sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install stress -y &amp;amp;&amp;amp; stress --cpu 4 --timeout 240"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command successfully pulled down the &lt;code&gt;stress&lt;/code&gt; utility binaries and pinned all virtual processors at 100% load. &lt;/p&gt;

&lt;h4&gt;
  
  
  📸 Proof Point 3: Automatic Backup Arrives!
&lt;/h4&gt;

&lt;p&gt;Exactly 3 minutes later, the autoscale engine registered the CPU breach, evaluated the threshold rules, and automatically spawned &lt;strong&gt;&lt;code&gt;WebAppVMSS_1&lt;/code&gt;&lt;/strong&gt; entirely on its own to support the environment:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fts8louen8hgzmlp6xl4t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fts8louen8hgzmlp6xl4t.png" alt=" " width="799" height="355"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  💡 Core AZ-104 Exam Lessons Learned
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Uniform vs. Flexible Orchestration:&lt;/strong&gt; Uniform mode forces strict identical virtual machine instances from a pre-defined image template, which is ideal for stateless web app clusters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layer 4 Load Balancing Integration:&lt;/strong&gt; High-availability computing sets handle internal address assignment automatically, abstracting node pools completely behind a single virtual front gate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metric Cooldown Metrics:&lt;/strong&gt; Setting appropriate cooldown aggregation time grains prevents "flapping conditions"—where nodes continuously scale up and down rapidly due to volatile traffic ripples.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ⏱️ Cost Management Rule (FinOps Discipline)
&lt;/h3&gt;

&lt;p&gt;To preserve promotional cloud tier credits, the high-availability resource infrastructure group was entirely wiped out the moment verification proofs were saved:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az group delete &lt;span class="nt"&gt;--name&lt;/span&gt; Marathahalli_Lab_RG_V2 &lt;span class="nt"&gt;--yes&lt;/span&gt; &lt;span class="nt"&gt;--no-wait&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>azure</category>
      <category>devops</category>
      <category>automation</category>
      <category>security</category>
    </item>
    <item>
      <title>The Underground Tunnel: How I Locked Down Enterprise Storage Without Breaking the App</title>
      <dc:creator>Abhishek Kadlii</dc:creator>
      <pubDate>Thu, 17 Sep 2026 07:24:43 +0000</pubDate>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc/the-underground-tunnel-how-i-locked-down-enterprise-storage-without-breaking-the-app-2lcg</link>
      <guid>https://dev.to/abhishek_kadlii_9ef4ca8bc/the-underground-tunnel-how-i-locked-down-enterprise-storage-without-breaking-the-app-2lcg</guid>
      <description>&lt;p&gt;Many people think securing data in the cloud just means setting a strong password. But in enterprise cloud security, leaving a storage account accessible via the public internet—even with a strong password—is like putting a heavy steel bank vault right on a busy public street. Anyone walking by can try to pick the lock or scan it.&lt;/p&gt;

&lt;p&gt;To solve this, I completely smashed that front public door shut and dug a private underground tunnel—known as an Azure Private Endpoint—connecting my application server directly to the vault.&lt;/p&gt;




&lt;h3&gt;
  
  
  🏰 The Analogy: Public Street Vault vs. Underground Tunnel
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Public Endpoint (Vulnerable):&lt;/strong&gt; Your bank vault sits on a busy highway. Even though it is locked, hackers worldwide can knock on the door, scan your firewall mechanisms, and bombard it with traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Private Endpoint (Secured):&lt;/strong&gt; You disable the public street door completely. Then, you dig a private access tunnel from the basement of your internal app building straight into the vault. No one on the public street can even see that the door exists.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Internet / Hackers ] ───► ❌ (Public Access Blocked at Edge)

[ App Subnet: 10.0.1.0/24 ] ──(Private IP: 10.0.1.4)──► [ Blob Storage Vault ]
                                      ▲
                                      │ (Resolved via Private DNS Zone)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🛠️ Step-by-Step Implementation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Locking the Vault (Disabling Public Access)
&lt;/h4&gt;

&lt;p&gt;First, I created the storage account and explicitly revoked public network access from the outside world using the Azure CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create the Storage Account&lt;/span&gt;
az storage account create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; storevaultsea20949 &lt;span class="nt"&gt;-l&lt;/span&gt; southeastasia &lt;span class="nt"&gt;--sku&lt;/span&gt; Standard_LRS

&lt;span class="c"&gt;# Block all public network access at the front gate&lt;/span&gt;
az storage account update &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; storevaultsea20949 &lt;span class="nt"&gt;--public-network-access&lt;/span&gt; Disabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  📸 Proof Point 1: Smashed Front Gate
&lt;/h4&gt;

&lt;p&gt;This verification step in the Azure Portal shows that public network entry points are 100% disabled:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faxoxzyqn00sskipmhyat.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faxoxzyqn00sskipmhyat.png" alt=" " width="799" height="419"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  2. Digging the Underground Tunnel (Private Endpoint)
&lt;/h4&gt;

&lt;p&gt;Next, I carved out a dedicated, internal private IP address on my virtual network subnet and wired it directly to the Blob storage service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az network private-endpoint create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-n&lt;/span&gt; Storage_Private_Endpoint &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--vnet-name&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--subnet&lt;/span&gt; Management_SEA_Subnet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--private-connection-resource-id&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;az storage account show &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; storevaultsea20949 &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; tsv&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--group-id&lt;/span&gt; blob &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--connection-name&lt;/span&gt; Blob_Private_Conn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  📸 Proof Point 2: The Private Interface Allocation
&lt;/h4&gt;

&lt;p&gt;By inspecting the network interface generated by the private link endpoint, we can see that it grabbed the internal IP &lt;strong&gt;10.0.1.4&lt;/strong&gt; straight out of our virtual network subnet:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyqbqvtpu9iodcu1tkpxg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyqbqvtpu9iodcu1tkpxg.png" alt=" " width="799" height="374"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  3. Overriding the Map (Private DNS Zone Integration)
&lt;/h4&gt;

&lt;p&gt;Normally, when a computer looks up a storage URL, the internet returns a public IP address. To force traffic through our underground tunnel, I built an internal Private DNS zone to override that lookup map locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create the Private DNS Zone mandated for Azure Blobs&lt;/span&gt;
az network private-dns zone create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; privatelink.blob.core.windows.net

&lt;span class="c"&gt;# Link the Private DNS Zone to our Virtual Network&lt;/span&gt;
az network private-dns &lt;span class="nb"&gt;link &lt;/span&gt;vnet create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-z&lt;/span&gt; privatelink.blob.core.windows.net &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-n&lt;/span&gt; Link_Hub_VNet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--registration-enabled&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;

&lt;span class="c"&gt;# Bind the Private Endpoint configuration to register the internal A-record automatically&lt;/span&gt;
az network private-endpoint dns-zone-group create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--endpoint-name&lt;/span&gt; Storage_Private_Endpoint &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; Storage_DNS_Group &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--private-dns-zone&lt;/span&gt; privatelink.blob.core.windows.net &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--zone-name&lt;/span&gt; blob
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  📸 Proof Point 3: The Private Route Record Mapping
&lt;/h4&gt;

&lt;p&gt;This is the ultimate verification. In the Private DNS Recordsets grid, our unique cloud storage endpoint URL maps perfectly onto our internal private IP address:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faov2fc0p7qldzhhvjm20.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faov2fc0p7qldzhhvjm20.png" alt=" " width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🛑 The Real-World Blocker: The 403 Forbidden Shock
&lt;/h3&gt;

&lt;p&gt;During initial testing from inside an application server, trying to fetch a file threw a glaring error: &lt;code&gt;AuthorizationFailure: This request is not authorized to perform this operation.&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Root Cause:&lt;/strong&gt; The server was still asking public internet DNS servers for the location, resolving the blocked public interface instead of using the private endpoint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; I properly linked the Private DNS zone configuration to the Private Endpoint. Azure automatically created an internal A Record pointing the storage link straight to our internal IP address (&lt;strong&gt;10.0.1.4&lt;/strong&gt;). The request instantly traversed the private network backbone safely.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  💡 Core AZ-104 Exam Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Public Network Access Drop:&lt;/strong&gt; Setting this to &lt;code&gt;Disabled&lt;/code&gt; tells Azure's edge routing layer to drop incoming public packets immediately before they reach your data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private Endpoints:&lt;/strong&gt; This injects a Virtual Network Interface Card (vNIC) into a subnet, giving a multi-tenant platform service a dedicated private entry point.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conditional Forwarding Override:&lt;/strong&gt; Azure uses the specific &lt;code&gt;privatelink.blob.core.windows.net&lt;/code&gt; namespace internally to override standard internet routing routes cleanly.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ⏱️ Sandbox Cleanup
&lt;/h3&gt;

&lt;p&gt;To ensure compliance with strict cloud sandboxing constraints and avoid lingering costs on the tier, the resources were immediately deleted using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az group delete &lt;span class="nt"&gt;--name&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--yes&lt;/span&gt; &lt;span class="nt"&gt;--no-wait&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>azure</category>
      <category>security</category>
      <category>devops</category>
      <category>automation</category>
    </item>
    <item>
      <title>Shifting to IaC: Writing the 183-Line Central Firewall Engine in Bicep When the Portal Hits a Wall | Day 9 &amp; 10</title>
      <dc:creator>Abhishek Kadlii</dc:creator>
      <pubDate>Wed, 27 May 2026 06:45:25 +0000</pubDate>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc/shifting-to-iac-writing-the-183-line-central-firewall-engine-in-bicep-when-the-portal-hits-a-wall-1n5l</link>
      <guid>https://dev.to/abhishek_kadlii_9ef4ca8bc/shifting-to-iac-writing-the-183-line-central-firewall-engine-in-bicep-when-the-portal-hits-a-wall-1n5l</guid>
      <description>&lt;p&gt;In my Day 8 lab, we successfully executed a classic data-plane traffic hijack. By forging a User Defined Route (UDR) for &lt;code&gt;0.0.0.0/0&lt;/code&gt; on our Spoke network (&lt;code&gt;Sec_Spoke_SEA_VNet&lt;/code&gt;), we successfully ripped traffic away from its default internet path and funneled it straight into a virtual appliance placeholder IP at &lt;code&gt;10.0.1.4&lt;/code&gt; inside our Hub. As my terminal verification tests proved, outbound internet transit hit a hard 100% packet hole.&lt;/p&gt;

&lt;p&gt;For Days 9 &amp;amp; 10, the mission was clear: replace that placeholder IP with a live, stateful &lt;strong&gt;Azure Native Firewall (Basic SKU)&lt;/strong&gt; to intercept, inspect, and enforce rule collections on those hijacked packets.&lt;/p&gt;

&lt;p&gt;Then, reality hit. Mid-sprint, my active 30-day promotional credit pool hit its expiration safety boundary. My portal dashboard flagged a paused state with an absolute balance of ₹0.00. &lt;/p&gt;

&lt;p&gt;In a production enterprise environment, infrastructure blockers like this happen all the time. Budgets freeze, subscription terms shift, or portal access gets locked down. As a Network Security Engineer transitioning into DevSecOps, you don’t stop the roadmap; you change your delivery mechanism. Instead of manually clicking buttons inside the billing-active Azure Portal GUI, I pivoted immediately. I abstracted our entire physical network, routing states, peering hooks, and stateful security rules into a single, declarative &lt;strong&gt;Infrastructure-as-Code (IaC)&lt;/strong&gt; deployment blueprint using &lt;strong&gt;Azure Bicep&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By moving from the GUI to local code, I built and validated the complete security engine architecture entirely for free inside Visual Studio Code with zero out-of-pocket financial risk.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Network Logic: What Are We Architecting?
&lt;/h2&gt;

&lt;p&gt;Before looking at the codebase, let’s map out exactly how data packets traverse this topology during runtime:&lt;/p&gt;

&lt;p&gt;[ Private Spoke Subnet: 10.1.1.0/24 ]&lt;br&gt;
│&lt;br&gt;
▼ (User Defined Route: 0.0.0.0/0 ➔ Next Hop: 10.0.2.4)&lt;br&gt;
[ AzureFirewallSubnet: 10.0.2.0/24 ] ──► Stateful Inspection Engine&lt;br&gt;
│&lt;br&gt;
├──► Matched Rule (UDP Port 53) ──► Allowed ──► Source NAT (SNAT) ➔ Internet&lt;br&gt;
└──► Unmatched Rule (TCP 80/443) ──► Dropped ➔ Implicit Deny Posture&lt;/p&gt;

&lt;p&gt;If you are coming from a traditional Network Security TAC background (like managing Palo Alto Prisma Access service connections or security zones), this setup mimics a centralized Next-Generation Firewall (NGFW) deployment. &lt;/p&gt;

&lt;p&gt;The private Spoke VM does not have a public interface or an internet gateway. When it tries to talk to the outside world, our UDR acts as a mandatory signpost forcing the packet across the VNet Peering highway into the Hub's &lt;code&gt;AzureFirewallSubnet&lt;/code&gt; at coordinate &lt;code&gt;10.0.2.4&lt;/code&gt;. The firewall then parses the packet from Layer 3 up to Layer 7, cross-references it with our rule policy, and decides whether to let it transit or drop it on the floor.&lt;/p&gt;


&lt;h2&gt;
  
  
  Complete Enterprise-Grade Bicep Security Blueprint
&lt;/h2&gt;

&lt;p&gt;Below is the complete, unedited 183-line Bicep file that builds the entire baseline network fabric and trains the central firewall's inspection engine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;param location string = 'southeastasia'

// ===================================================================
// 1. CENTRAL ROUTE TABLE (THE TRAFFIC HIJACK SIGNPOST)
// ===================================================================
resource spokeRouteTable 'Microsoft.Network/routeTables@2023-09-01' = {
  name: 'Spoke_To_Hub_RT'
  location: location
  properties: {
    routes: [
      {
        name: 'Route_To_Hub'
        properties: {
          addressPrefix: '0.0.0.0/0'         // Intercepts all outbound internet traffic
          nextHopType: 'VirtualAppliance'     // Overrides default system provider routing
          nextHopIpAddress: '10.0.2.4'       // Core internal private IP of our Azure Firewall
        }
      }
    ]
  }
}

// ===================================================================
// 2. CORE HUB NETWORK (MANAGEMENT, FIREWALL, AND GATEWAY SEGMENTS)
// ===================================================================
resource hubVnet 'Microsoft.Network/virtualNetworks@2023-09-01' = {
  name: 'Sec_Hub_SEA_VNet'
  location: location
  properties: {
    addressSpace: {
      addressPrefixes: [ '10.0.0.0/16' ]
    }
    subnets: [
      {
        name: 'Management_SEA_Subnet'
        properties: {
          addressPrefix: '10.0.1.0/24'
        }
      }
      {
        name: 'AzureFirewallSubnet'         // Mandated structural name for native engine binding
        properties: {
          addressPrefix: '10.0.2.0/24'
        }
      }
      {
        name: 'GatewaySubnet'               // Reserved segment for future VPN/ExpressRoute Gateways
        properties: {
          addressPrefix: '10.0.3.0/24'
        }
      }
    ]
  }
}

// ===================================================================
// 3. SPOKE PRODUCTION NETWORK (BOUND TO TRAFFIC HIJACK UDR)
// ===================================================================
resource spokeVnet 'Microsoft.Network/virtualNetworks@2023-09-01' = {
  name: 'Sec_Spoke_SEA_VNet'
  location: location
  properties: {
    addressSpace: {
      addressPrefixes: [ '10.1.0.0/16' ]
    }
    subnets: [
      {
        name: 'App_Prod_Subnet'
        properties: {
          addressPrefix: '10.1.1.0/24'
          routeTable: {
            id: spokeRouteTable.id           // Associates the traffic-hijacking UDR table
          }
        }
      }
    ]
  }
}

// ===================================================================
// 4. BIDIRECTIONAL NETWORK PEERING: HUB TO SPOKE
// ===================================================================
resource hubToSpokePeering 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings@2023-09-01' = {
  parent: hubVnet
  name: 'Hub_To_Spoke_Peer'
  properties: {
    allowVirtualNetworkAccess: true
    allowForwardedTraffic: true
    allowGatewayTransit: false
    useRemoteGateways: false
    remoteVirtualNetwork: {
      id: spokeVnet.id
    }
  }
}

// ===================================================================
// 5. BIDIRECTIONAL NETWORK PEERING: SPOKE TO HUB
// ===================================================================
resource spokeToHubPeering 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings@2023-09-01' = {
  parent: spokeVnet
  name: 'Spoke_To_Hub_Peer'
  properties: {
    allowVirtualNetworkAccess: true
    allowForwardedTraffic: true
    allowGatewayTransit: false
    useRemoteGateways: false
    remoteVirtualNetwork: {
      id: hubVnet.id
    }
  }
}

// ===================================================================
// 6. CENTRAL FIREWALL PUBLIC EGRESS INTERFACE (PUBLIC IP)
// ===================================================================
resource firewallPublicIP 'Microsoft.Network/publicIPAddresses@2023-09-01' = {
  name: 'Sec_Hub_FW_PIP'
  location: location
  sku: {
    name: 'Standard'
  }
  properties: {
    publicIPAllocationMethod: 'Static'
  }
}

// ===================================================================
// 7. CENTRAL FIREWALL POLICY CONTAINER (THE SECURITY RULEBOOK)
// ===================================================================
resource firewallPolicy 'Microsoft.Network/firewallPolicies@2023-09-01' = {
  name: 'Hub_Central_FW_Policy'
  location: location
  properties: {
    sku: {
      tier: 'Basic'
    }
  }
}

// ===================================================================
// 8. CENTRAL NATIVE FIREWALL ENGINE PROVISIONING
// ===================================================================
resource azureFirewall 'Microsoft.Network/azureFirewalls@2023-09-01' = {
  name: 'Central-Security-Engine'
  location: location
  properties: {
    sku: {
      name: 'AZFW_VNet'
      tier: 'Basic'
    }
    firewallPolicy: {
      id: firewallPolicy.id
    }
    ipConfigurations: [
      {
        name: 'fw-ip-config'
        properties: {
          publicIPAddress: {
            id: firewallPublicIP.id
          }
          subnet: {
            id: '${hubVnet.id}/subnets/AzureFirewallSubnet' // Drops interface into reserved subnet
          }
        }
      }
    ]
  }
}

// ===================================================================
// 9. STATEFUL RULE COLLECTION GROUP (LAYER 4 NETWORK FILTER RULES)
// ===================================================================
resource ruleCollectionGroup 'Microsoft.Network/firewallPolicies/ruleCollectionGroups@2023-09-01' = {
  parent: firewallPolicy
  name: 'Outbound_Traffic_RCG'
  properties: {
    priority: 1000
    ruleCollections: [
      {
        ruleCollectionType: 'FirewallPolicyFilterRuleCollection'
        name: 'Allow_Core_Network'
        priority: 1100
        action: {
          type: 'Allow'
        }
        rules: [
          {
            ruleType: 'NetworkRule'
            name: 'Allow_DNS'
            ipProtocols: [
              'UDP'
            ]
            sourceAddresses: [
              '10.1.1.0/24'                  // Permits packets originating from Spoke Prod Subnet
            ]
            destinationAddresses: [
              '8.8.8.8'                      // Target: Google Primary DNS
              '8.8.4.4'                      // Target: Google Secondary DNS
            ]
            destinationPorts: [
              '53'                           // Limits traffic strictly to DNS query protocols
            ]
          }
        ]
      }
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Deep-Dive: Code Logic &amp;amp; Packet Inspection Mechanics
&lt;/h2&gt;

&lt;p&gt;When discussing this topology in enterprise cloud security interviews, you must be able to trace how this specific code handles packet state:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The UDR Override Mechanics (Resource 1)&lt;/strong&gt;: By declaring a custom route for &lt;code&gt;0.0.0.0/0&lt;/code&gt; with a &lt;code&gt;nextHopType&lt;/code&gt; of &lt;code&gt;VirtualAppliance&lt;/code&gt;, we explicitly override default systemic routing. The infrastructure forces the next-hop IP mapping to match &lt;code&gt;10.0.2.4&lt;/code&gt;, which is the exact internal interface of our upcoming firewall engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The API Subnet Constraint (Resource 2)&lt;/strong&gt;: The Azure resource provider imposes a strict naming policy. A native firewall cannot attach to an arbitrarily named subnet profile. It searches exclusively for a subnet token string labeled &lt;strong&gt;&lt;code&gt;AzureFirewallSubnet&lt;/code&gt;&lt;/strong&gt;. We carved out a dedicated &lt;code&gt;/24&lt;/code&gt; block (&lt;code&gt;10.0.2.0/24&lt;/code&gt;) to handle the private clustering interfaces of the engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stateful Layer 4 Filtering (Resource 9)&lt;/strong&gt;: This section defines our firewall policy rulebook. The engine operates on an &lt;strong&gt;Implicit Deny&lt;/strong&gt; architecture—if a packet parameter profile does not explicitly match an allowed rule entry, it drops dead at the gate.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Allowed Execution Flow&lt;/strong&gt;: A workload inside our Spoke network (&lt;code&gt;10.1.1.0/24&lt;/code&gt;) generates a standard domain name lookup request toward external DNS resolver &lt;code&gt;8.8.8.8&lt;/code&gt; over &lt;strong&gt;UDP Port 53&lt;/strong&gt;. The firewall parses the packet headers, finds an exact match inside our &lt;code&gt;Allow_DNS&lt;/code&gt; rule matrix, permits the transit, and executes Source NAT (SNAT) using our public IP (&lt;code&gt;Sec_Hub_FW_PIP&lt;/code&gt;) to preserve private topology boundaries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Implicit Deny Flow&lt;/strong&gt;: A background process or a user inside that same Spoke network attempts to establish an outbound web session over HTTP (Port &lt;code&gt;80&lt;/code&gt;) or HTTPS (Port &lt;code&gt;443&lt;/code&gt;). The packet hit the firewall interface. The stateful inspector reviews the policy definitions, encounters an absolute absence of any rule mapping ports 80/443, and silently drops the connection instantly. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Code Logic &amp;amp; Traffic Processing Deep-Dive
&lt;/h2&gt;

&lt;p&gt;To demonstrate absolute operational mastery during cloud engineering interviews, we must break down how this file behaves during active network runtime:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Resource 1 (&lt;code&gt;spokeRouteTable&lt;/code&gt;)&lt;/strong&gt;: This object overrides default routing behavior. By creating a custom route entry for &lt;code&gt;0.0.0.0/0&lt;/code&gt; (all internet traffic) with a &lt;code&gt;nextHopType&lt;/code&gt; parameter explicitly declared as &lt;code&gt;VirtualAppliance&lt;/code&gt;, we disrupt standard network isolation. Any server on this subnet that tries to reach an external resource is automatically pointed directly to &lt;code&gt;10.0.2.4&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource 2 (&lt;code&gt;hubVnet&lt;/code&gt;) Subnet Naming Constraint&lt;/strong&gt;: The Azure API dictates that a native firewall appliance cannot bind to an arbitrary subnet profile. It requires an exact structural string identifier named &lt;strong&gt;&lt;code&gt;AzureFirewallSubnet&lt;/code&gt;&lt;/strong&gt;. We carved out a dedicated &lt;code&gt;/24&lt;/code&gt; block (&lt;code&gt;10.0.2.0/24&lt;/code&gt;) to handle the clustering interfaces of the underlying infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource 9 (&lt;code&gt;ruleCollectionGroup&lt;/code&gt;) Layer 4 Parsing&lt;/strong&gt;: This is where our packet filtering criteria are established. The firewall runs a stateful inspection engine, matching source vectors against destination coordinates.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Evaluated Match&lt;/strong&gt;: When a compute host inside our Spoke network (&lt;code&gt;10.1.1.0/24&lt;/code&gt;) generates an upstream lookup request toward &lt;code&gt;8.8.8.8&lt;/code&gt; on &lt;strong&gt;UDP Port 53&lt;/strong&gt;, the firewall validates an exact parameter match in its rule collection and permits egress traffic while executing Source NAT (SNAT).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Implicit Deny Enforcement&lt;/strong&gt;: If an active process on that same workload attempts to create an outbound HTTP web session on port &lt;code&gt;80&lt;/code&gt; or an HTTPS connection on port &lt;code&gt;443&lt;/code&gt;, the data packet hits the firewall interface. The engine reviews the policy rules, encounters a total absence of any rule covering ports 80/443, and instantly drops the connection with zero response back to the client.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Compilation Verification &amp;amp; Local Quality Control
&lt;/h2&gt;

&lt;p&gt;To ensure the technical validity, reference bindings, and compliance of this 183-line enterprise design without launching live, billing-active resources, I leveraged the built-in Microsoft Bicep language compilation workspace inside Visual Studio Code.&lt;/p&gt;

&lt;p&gt;The compiler ran an extensive static validation analysis across our declared topography configurations, network peering structures, and rule groups, verifying a completely flawless design layout:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyh69ll7wf61ij44dgv68.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyh69ll7wf61ij44dgv68.png" alt=" " width="799" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The local IDE output officially confirmed: &lt;strong&gt;&lt;code&gt;No problems have been detected in the workspace.&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>security</category>
      <category>devops</category>
      <category>automation</category>
    </item>
    <item>
      <title>The Live Traffic Intercept: Bringing the Cloud Fortress to Life (Day 8)</title>
      <dc:creator>Abhishek Kadlii</dc:creator>
      <pubDate>Mon, 25 May 2026 06:49:22 +0000</pubDate>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc/the-live-traffic-intercept-bringing-the-cloud-fortress-to-life-day-8-323l</link>
      <guid>https://dev.to/abhishek_kadlii_9ef4ca8bc/the-live-traffic-intercept-bringing-the-cloud-fortress-to-life-day-8-323l</guid>
      <description>&lt;p&gt;As I was curious after reading and implementing the User-Defined Routing (UDR) and subnet-slicing concepts previously, I couldn't wait to test this out under live traffic conditions. Theory is fine on paper, but as an infrastructure engineer, I don't truly trust a network design until I break it, throw live packets at it, and look at the raw terminal logs.&lt;/p&gt;

&lt;p&gt;Tonight, I stepped completely out of the textbooks and moved assets onto the cloud field. I deployed two live virtual servers inside my Singapore network sandbox, faced down strict regional quota walls, bypassed local internet restrictions, and operationally proved that my traffic hijacking detour rule works perfectly under real production conditions.&lt;/p&gt;

&lt;p&gt;Here is the step-by-step engineering log of how I did it, the real-world troubleshooting steps I took, and the underlying mechanics explained so simply that anyone can understand it.&lt;/p&gt;

&lt;p&gt;🏛️The Day 8 Deployment Strategy: Setting the Field&lt;/p&gt;

&lt;p&gt;To safely test our custom detour signpost without opening our network to the public internet, I had to deploy two distinct virtual machines into my sandbox environment. To keep my billing running at exactly ₹0/hour, I utilized Microsoft's newer, high-performance AMD free-tier eligible engine size (Standard_B2ats_v2).&lt;/p&gt;

&lt;p&gt;💡The Analogy: The Front Security Lobby vs. The Locked Back Vault&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Hub-Mgmt-VM (The Front Lobby Desk): This machine sits right inside the public entryway of our network (Management_SEA_Subnet). It is given an official, fixed public street address (Static Public IP) so that administrators can find it and log into it from the outside world.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spoke-App-VM (The Hidden Back Vault): This machine sits deep inside the isolated production floor (App_Prod_Subnet) within the Spoke VNet. To maintain strict security, this machine is given absolutely no public front door. It has no public IP address, making it completely invisible to the internet and dependent on our hub-and-spoke bridge to talk to the world.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🛠️The Step-by-Step Command-Line Execution&lt;/p&gt;

&lt;p&gt;Instead of clicking through the graphics of the Azure Portal GUI, I typed the deployment scripts manually into the Azure Cloud Shell to burn the syntax directly into my muscle memory.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generating the Golden Cryptographic Login Keys&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before spinning up the servers, I generated a pair of secure cryptographic keys. In professional enterprise security, we completely ban weak, guessable text passwords. Instead, we use advanced mathematics to generate an interconnected Private Golden Key (kept in our pocket) and a matching Public Lock (bolted onto the server door).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;bash

ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; rsa &lt;span class="nt"&gt;-b&lt;/span&gt; 2048 &lt;span class="nt"&gt;-f&lt;/span&gt; ~/.ssh/id_rsa &lt;span class="nt"&gt;-N&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🚙Code Decoder (Line-by-Line):&lt;/p&gt;

&lt;p&gt;ssh-keygen - Starts the security engine tool to manufacture secure digital keys and locks.&lt;/p&gt;

&lt;p&gt;-t rsa - Tells the computer to use the industry-standard RSA math algorithm for maximum security.&lt;/p&gt;

&lt;p&gt;-b 2048 - Makes the lock 2,048 bits thick, which would take supercomputers billions of years to crack.&lt;/p&gt;

&lt;p&gt;-f ~/.ssh/id_rsa - Saves your private golden key as id_rsa and your public lock as id_rsa.pub in a hidden folder.&lt;/p&gt;

&lt;p&gt;-N "" - Assigns a blank passphrase so our automation code can read the keys instantly without annoying prompts.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Provisioning the Entryway Jump Box (Hub Machine)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I launched the administrative entryway machine directly inside the Singapore network layout using our AMD free-tier compute profile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;bash 

az vm create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; Hub-Mgmt-VM &lt;span class="nt"&gt;--location&lt;/span&gt; southeastasia &lt;span class="nt"&gt;--vnet-name&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="nt"&gt;--subnet&lt;/span&gt; Management_SEA_Subnet &lt;span class="nt"&gt;--image&lt;/span&gt; Ubuntu2204 &lt;span class="nt"&gt;--size&lt;/span&gt; Standard_B2ats_v2 &lt;span class="nt"&gt;--admin-username&lt;/span&gt; abhishek &lt;span class="nt"&gt;--ssh-key-values&lt;/span&gt; ~/.ssh/id_rsa.pub &lt;span class="nt"&gt;--public-ip-address-allocation&lt;/span&gt; static
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🚙Code Decoder (Line-by-Line):&lt;/p&gt;

&lt;p&gt;az vm create - Orders Azure to go to its physical hardware racks and carve out a new virtual server.&lt;/p&gt;

&lt;p&gt;-g Marathahalli_Lab_RG - Groups all the server assets (disks, cards) inside my regional resource folder.&lt;/p&gt;

&lt;p&gt;-n Hub-Mgmt-VM - Labels this machine "Hub-Mgmt-VM" so we can easily track it in logs.&lt;/p&gt;

&lt;p&gt;--location southeastasia - Bypasses local data center hardware shortages by building the machine straight in Singapore.&lt;/p&gt;

&lt;p&gt;--vnet-name Sec_Hub_SEA_VNet - Plugs this machine's network card directly into our central Hub network.&lt;/p&gt;

&lt;p&gt;--subnet Management_SEA_Subnet - Drops the machine into the dedicated room reserved for administrative management desks.&lt;/p&gt;

&lt;p&gt;--image Ubuntu2204 - Installs a clean, production-ready version of the Ubuntu Linux 22.04 operating system.&lt;/p&gt;

&lt;p&gt;--size Standard_B2ats_v2 - Our Zero-Cost Safeguard; chooses a dual-core AMD size that is 100% free-tier eligible.&lt;/p&gt;

&lt;p&gt;--admin-username abhishek - Creates the master administrator user profile inside the Linux operating system.&lt;/p&gt;

&lt;p&gt;--ssh-key-values ~/.ssh/id_rsa.pub - Takes the public lock file we created earlier and bolts it onto the server login gate.&lt;/p&gt;

&lt;p&gt;--public-ip-address-allocation static - Gives this lobby desk a fixed, unchanging internet address so we can always connect from home.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Provisioning the Completely Private Workload (Spoke Machine)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next, I launched our isolated application instance. Notice the empty quotes at the very end of the script—this explicitly commands Azure to deny this machine a public IP door, keeping it completely private:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;bash

az vm create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; Spoke-App-VM &lt;span class="nt"&gt;--location&lt;/span&gt; southeastasia &lt;span class="nt"&gt;--vnet-name&lt;/span&gt; Sec_Spoke_SEA_VNet &lt;span class="nt"&gt;--subnet&lt;/span&gt; App_Prod_Subnet &lt;span class="nt"&gt;--image&lt;/span&gt; Ubuntu2204 &lt;span class="nt"&gt;--size&lt;/span&gt; Standard_B2ats_v2 &lt;span class="nt"&gt;--admin-username&lt;/span&gt; abhishek &lt;span class="nt"&gt;--ssh-key-values&lt;/span&gt; ~/.ssh/id_rsa.pub &lt;span class="nt"&gt;--public-ip-address&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🚙Code Decoder (Line-by-Line):&lt;/p&gt;

&lt;p&gt;--vnet-name Sec_Spoke_SEA_VNet - Targets our Spoke Network instead of our Hub network.&lt;/p&gt;

&lt;p&gt;--subnet App_Prod_Subnet - Drops this machine onto our isolated production factory floor block.&lt;/p&gt;

&lt;p&gt;--public-ip-address "" - The Isolation Shield; passing empty quotes forbids Azure from giving this server a public IP address.&lt;/p&gt;

&lt;p&gt;📊 The Routing Validation Blueprint: The Live Tests&lt;/p&gt;

&lt;p&gt;Once both servers were live, it was time to run our live validation test plan. We need to mathematically and operationally prove that our traffic hijacking detour rules are working.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`    ===================================================================================
    =                         THE LIVE TRAFFIC FLOW DIAGRAM                           =
    ===================================================================================

     [ Home/Cloud Terminal ] --(Passes Through)--&amp;gt; [ Hub Lobby Jump Box: 10.0.1.4 ]



                                                            |
                                                   (VNet Peering Bridge)
                                                            |
                                                            v
     [ Internet: 8.8.8.8 ] &amp;lt;---(100% PACKET LOSS!)--- [ Private Spoke VM: 10.1.1.4 ]
          ^                                                 |



          |                                        (User-Defined Route)
          |                                                 |
          +=========== (HIJACKED TO BLACK HOLE!) ===========+
`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Test 1: The Master Itinerary Manifest Audit (Effective Routes Query)&lt;/p&gt;

&lt;p&gt;Before sending a packet, I queried Azure’s network routing engine directly to show me what map the Spoke network interface was using under the hood:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;bash

az network nic show-effective-route-table &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; Spoke-App-VMVMNic &lt;span class="nt"&gt;-o&lt;/span&gt; table
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🚙Code Decoder (Line-by-Line):&lt;/p&gt;

&lt;p&gt;az network nic - Targets the virtual Network Interface Card attached to our private Spoke server.&lt;/p&gt;

&lt;p&gt;show-effective-route-table - Interrogates Azure's live routing processor to show the active traffic map.&lt;/p&gt;

&lt;p&gt;-n Spoke-App-VMVMNic - Targets the specific system name of our Spoke machine's network adapter card.&lt;/p&gt;

&lt;p&gt;-o table - Orders the output messy code to cleanly rearrange itself into a beautiful grid with headers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxf4jjj4pt445bcfndmz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxf4jjj4pt445bcfndmz.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result was an absolute architectural victory! The table showed our manual detour route for 0.0.0.0/0 sitting as Active, while Azure’s native, unmonitored default highway to the internet was marked as completely Invalid.&lt;/p&gt;

&lt;p&gt;Test 2: The Inner Private Walkway Check (The Peering Bridge Jump)&lt;/p&gt;

&lt;p&gt;I used secure SSH Agent Forwarding (ssh -A) to pass through my public entryway lobby box and jump straight onto the internal private IP of our isolated Spoke machine (10.1.1.4).&lt;/p&gt;

&lt;p&gt;Once inside the Spoke machine's shell prompt, I executed an internal connectivity check back to the Hub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;bash

ping &lt;span class="nt"&gt;-c&lt;/span&gt; 4 10.0.1.4
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🚙Code Decoder (Line-by-Line):&lt;/p&gt;

&lt;p&gt;ping - Sends small network test packets to an IP address to see if it is awake.&lt;/p&gt;

&lt;p&gt;-c 4 - Sets a count limit flag; stops sending test packets automatically after 4 attempts.&lt;/p&gt;

&lt;p&gt;10.0.1.4 - Targets the private internal IP coordinate of our Hub management desk room.&lt;/p&gt;

&lt;p&gt;The packets zoomed across the private VNet Peering footbridge instantly, returning a perfect 0% packet loss statistic. This proved that our internal private communication lines were completely healthy and operational.&lt;/p&gt;

&lt;p&gt;Test 3: The Black Hole Validation Check (The Ultimate Hijack Proof)&lt;/p&gt;

&lt;p&gt;Now, the grand finale. While standing inside the private Spoke machine, I attempted to send a packet out to Google's public internet server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;bash

ping &lt;span class="nt"&gt;-c&lt;/span&gt; 4 8.8.8.8
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🚙Code Decoder (Line-by-Line):&lt;/p&gt;

&lt;p&gt;8.8.8.8 - Targets a well-known public internet server (Google's Public DNS infrastructure).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0znoxnr6d6jh79cojc48.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0znoxnr6d6jh79cojc48.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The terminal hung for a moment, and then returned exactly 100% packet loss.&lt;/p&gt;

&lt;p&gt;In ordinary desktop computing, losing all your packets looks like a failure. But in Cloud Network Security Engineering, this is a spectacular win! It operationally proves that our custom detour sign successfully intercepted the outbound internet packet at the subnet boundary and shoved it down our secure detour corridor. Because we haven't built the actual firewall software engine at that destination endpoint yet, the traffic terminates safely at that empty boundary, confirming that our perimeter isolation is working flawlessly.&lt;/p&gt;

&lt;p&gt;💰Financial Discipline Check: Protecting the Trial Runway&lt;/p&gt;

&lt;p&gt;By maintaining strict enterprise resource boundaries and leveraging Azure's dual-core AMD free-tier eligible compute allocations, our active sandbox running cost sits at exactly ₹0 per hour. This leaves my full promotional credit balance safe at ~₹18,909 for our upcoming security engine deployments.&lt;/p&gt;

&lt;p&gt;🏁Day 8 Wrap-Up&lt;/p&gt;

&lt;p&gt;Tonight was a massive architectural leap forward. By typing out raw CLI statements, resolving core quotas, and validating data-plane packet paths step by step, I am locking in the exact hands-on engineering confidence needed for senior enterprise technical panels.&lt;/p&gt;

&lt;p&gt;The isolated sandbox field is fully verified. Next up, we deploy our central security engine—the live Azure Native Firewall—to capture that black-holed traffic, inspect it, and safely bridge our secure fortress out to the public web!&lt;/p&gt;

&lt;p&gt;🛠️Safe Infrastructure Resting Script&lt;/p&gt;

&lt;p&gt;To keep our active billing runway perfectly protected while we draft our notes, I executed a master deallocation script from the Cloud Shell Control Tower to put both machines into deep freeze at zero cost:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;bash

az vm deallocate &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--ids&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;az vm list &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"[].id"&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; tsv&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;--no-wait&lt;/span&gt;
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🚙Code Decoder (Line-by-Line):&lt;/p&gt;

&lt;p&gt;az vm deallocate - Commands Azure to stop compute billing entirely by releasing our CPU/RAM chips back into the shared datacenter pool.&lt;/p&gt;

&lt;p&gt;$(az vm list ... --query "[].id" -o tsv) - Automatically compiles a neat list of every single virtual machine ID inside our resource group folder.&lt;/p&gt;

&lt;p&gt;--no-wait - Forces the command to process silently in the background so we can instantly turn off our computer.&lt;/p&gt;

&lt;p&gt;Onward and upward! 🚀🔥&lt;/p&gt;

</description>
      <category>azure</category>
      <category>security</category>
      <category>devops</category>
      <category>career</category>
    </item>
    <item>
      <title>Sunday Double-Header: Erecting Checkpoints and Traffic Hijacking in the Cloud (Day 6 &amp; 7)</title>
      <dc:creator>Abhishek Kadlii</dc:creator>
      <pubDate>Mon, 25 May 2026 03:57:40 +0000</pubDate>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc/sunday-double-header-erecting-checkpoints-and-traffic-hijacking-in-the-cloud-day-6-7-388h</link>
      <guid>https://dev.to/abhishek_kadlii_9ef4ca8bc/sunday-double-header-erecting-checkpoints-and-traffic-hijacking-in-the-cloud-day-6-7-388h</guid>
      <description>&lt;p&gt;Continuing the weekend grind into Sunday night, I shifted my focus to a fundamental truth of enterprise cloud security: never trust a clear road. For the Day 6 and 7 double-header of my career transition blueprint, I decided to take the automatic, unmonitored highways that cloud providers build behind the scenes and completely tear them up. I moved away from simply connecting networks to executing a tactical traffic intercept—focusing on breaking down complex routing math into plain English and carving out clean, industrial-grade security checkpoints without spending a single rupee of my trial credit.&lt;/p&gt;

&lt;p&gt;By stepping completely out of the default cloud configuration mindset, I learned how to manually intercept global network traffic patterns and carve out specialized infrastructure zones to prepare my central cloud fortress for future Next-Generation Firewalls.&lt;/p&gt;

&lt;p&gt;Here is the technical blueprint of what I built, the real-world engineering constraints I had to solve, and the core routing mechanics broken down so simply that anyone can grasp them.&lt;/p&gt;

&lt;p&gt;🏛️Day 6: Setting the Detour (User-Defined Routes)&lt;/p&gt;

&lt;p&gt;Up until yesterday, our Hub VNet (the central terminal) and Spoke VNet (the application floor) were connected by a private footbridge called VNet Peering.&lt;/p&gt;

&lt;p&gt;💡The Analogy: The Unmonitored Highway vs. The Mandatory Detour&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Default State (System Routes): By default, Azure automatically hands a GPS map to every packet traveling between networks. If a machine inside the Spoke wants to talk to the Hub, the GPS takes it across a direct highway with zero checks, zero gates, and zero security guards. If a hacker breaches an application server, they can walk right into the corporate data center.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Secured State (User-Defined Routes / UDR): Imagine erecting a massive concrete jersey barrier across that highway and placing a giant Mandatory Detour Sign right at the exit gate of the Spoke subnet. The sign states: "You are no longer allowed to use the direct highway. All traffic leaving this building must exit down a side road and report straight to the Security Guard Post inside the Hub first."&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the cloud world, we call this Traffic Hijacking or packet interception. We are manually ripping up Azure's automatic mapping instructions and overriding them with our own strict routing rules to force data into a secure checkpoint queue.&lt;/p&gt;

&lt;p&gt;🛠️The Day 6 Command-Line Blueprint&lt;/p&gt;

&lt;p&gt;I cleared my terminal and typed these out manually to build the detour signpost and bolt it down to the application floor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;bash

&lt;span class="c"&gt;# 1. Create the physical wooden signpost frame (Route Table)&lt;/span&gt;
az network route-table create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; Spoke_To_Hub_RT &lt;span class="nt"&gt;-l&lt;/span&gt; southeastasia

&lt;span class="c"&gt;# 2. Paint the specific "Hijack" instruction onto the signpost&lt;/span&gt;
az network route-table route create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--route-table-name&lt;/span&gt; Spoke_To_Hub_RT &lt;span class="nt"&gt;-n&lt;/span&gt; Intercept_All_Traffic &lt;span class="nt"&gt;--address-prefix&lt;/span&gt; 0.0.0.0/0 &lt;span class="nt"&gt;--next-hop-type&lt;/span&gt; VirtualAppliance &lt;span class="nt"&gt;--next-hop-ip-address&lt;/span&gt; 10.0.1.4

&lt;span class="c"&gt;# 3. Bolt the signpost down to the exit door of our production application road&lt;/span&gt;
az network vnet subnet update &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--vnet-name&lt;/span&gt; Sec_Spoke_SEA_VNet &lt;span class="nt"&gt;-n&lt;/span&gt; App_Prod_Subnet &lt;span class="nt"&gt;--route-table&lt;/span&gt; Spoke_To_Hub_RT
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔍Deep-Dive Concept: The Rule of the Longest Prefix Match (LPM)&lt;/p&gt;

&lt;p&gt;When an individual router handles a packet, it might look at its manual and see multiple matching instructions. Azure resolves this conflict using a strict mathematical law: The most specific rule (the one with the longest bitmask number) ALWAYS wins.&lt;/p&gt;

&lt;p&gt;The Interview Trap to Watch Out For:&lt;/p&gt;

&lt;p&gt;If a packet leaves our Spoke subnet heading toward an IP address like 10.0.1.5, it matches two rules:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Our custom catch-all UDR: 0.0.0.0/0 (Length: 0)&lt;/li&gt;
&lt;li&gt;Azure's default peering route: 10.0.0.0/16 (Length: 16)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because 16 is a longer, more precise match than 0, Azure will prioritize the default route and completely bypass our custom detour sign! To successfully force local traffic through our future firewall, we must explicitly write a highly specific UDR targeting the 10.0.0.0/16 corporate range directly.&lt;/p&gt;

&lt;p&gt;🚀 Day 7: Carving Out the Hub Infrastructure Containment Zones&lt;/p&gt;

&lt;p&gt;Once the detour signpost was securely bolted down, I immediately pivoted to Day 7 to prepare the landing pads inside the central Hub network (Sec_Hub_SEA_VNet). Perimeter security engines cannot simply be dropped into regular network subnets alongside administrative tools. They require completely clean, walled-off infrastructure zones.&lt;/p&gt;

&lt;p&gt;💡The Analogy: The Airplane Cockpit and the Loading Dock&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Firewall Zone (AzureFirewallSubnet): Think of this like the Cockpit of a commercial airliner. It is a highly restricted room built for exactly one purpose: holding the pilots and the flight controls. Regular passengers are physically banned from walking inside or pulling up a desk there. If they do, they could accidentally hit a control lever and crash the plane.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Gateway Zone (GatewaySubnet): Think of this like a heavy-duty corporate Loading Dock at the back of the facility. It is fenced off exclusively to receive massive cargo trucks coming from your physical on-premise headquarters or your home network testing labs via secure underground transit tunnels.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🛠️The Day 7 Command-Line Blueprint&lt;/p&gt;

&lt;p&gt;I opened up my ledger book and manually carved out these two specialized rooms, making sure to use the exact case-sensitive names strictly required by Azure's background automated logic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;bash

&lt;span class="c"&gt;# 1. Carve out the restricted Cockpit zone on Page 2 of our ledger&lt;/span&gt;
az network vnet subnet create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--vnet-name&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="nt"&gt;-n&lt;/span&gt; AzureFirewallSubnet &lt;span class="nt"&gt;--address-prefixes&lt;/span&gt; 10.0.2.0/24

&lt;span class="c"&gt;# 2. Carve out the secure Loading Dock zone on Page 3 of our ledger&lt;/span&gt;
az network vnet subnet create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--vnet-name&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="nt"&gt;-n&lt;/span&gt; GatewaySubnet &lt;span class="nt"&gt;--address-prefixes&lt;/span&gt; 10.0.3.0/24
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fghffy9ns3rmc88mwj5pg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fghffy9ns3rmc88mwj5pg.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📊The Evolving Network Topology Map&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`       ===================================================================
       =                       MARATHAHALLI_LAB_RG                       =
       ===================================================================

         [ SEC_SPOKE_SEA_VNET ]                  [ SEC_HUB_SEA_VNET ]
             (10.1.0.0/16)                           (10.0.0.0/16)
        +-----------------------+               +-----------------------+



        |  [ App_Prod_Subnet ]  |               | [Management_SEA_Subnet|
        |     10.1.1.0/24       |               |     10.0.1.0/24       |
        +-----------+-----------+               +-----------+-----------+



                    |                                       |
                    | (Outbound Traffic)                    v
                    v                           +-----------------------+
         +---------------------+                |  AzureFirewallSubnet  |



         |  Spoke_To_Hub_RT    |                |  (The Cockpit Zone)   |
         |  (Route Table / UDR)|                |     10.0.2.0/24       |
         |   [0.0.0.0/0]------ | -----\         +-----------------------+
         +---------------------+       |                    |



                                       |                    v
             XXXXXXXXXXXXXXXXX         |         +-----------------------+
             X DEFAULT VNET  X         |         |     GatewaySubnet     |
             X PEERING ROUTE X         |         |  (The Loading Dock)   |
             X  (HIJACKED!)  X         |         |     10.0.3.0/24       |
             XXXXXXXXXXXXXXXXX         |         +-----------------------+



                    |                  |
                    \------------------+----&amp;gt; [ Future Firewall Appliance IP ]
                                                  (Placeholder Location: 10.0.1.4)
`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;💰Financial Discipline Check: Protecting the Trial Runway&lt;/p&gt;

&lt;p&gt;By adhering to strict enterprise resource management principles, all infrastructure components deployed over this double-header consist purely of logical network definitions, software route tables, and placeholder rule assignments.&lt;/p&gt;

&lt;p&gt;Because no heavy virtual machine CPUs, hardware firewalls, or static public IPs were active during this configuration phase, my sandbox running cost sits at exactly ₹0 per hour. This leaves my ~₹18,909 Azure free trial credit pool 100% intact and optimized for our upcoming operational deployment labs.&lt;/p&gt;

&lt;p&gt;🏁 Weekend Wrap-Up&lt;/p&gt;

&lt;p&gt;This Sunday was a massive structural leap forward. By typing out raw CLI paths manually, mastering IP allocation constraints, and designing a secure perimeter architecture block by block, I am solidifying the muscle memory needed to sit across from senior infrastructure panels with real confidence.&lt;/p&gt;

&lt;p&gt;The foundation is ready. Next week, we bring this network fortress to life by launching live testing workloads and configuring the traffic validation rules!&lt;/p&gt;

&lt;p&gt;Onward and upward! 🚀🔥&lt;/p&gt;

</description>
      <category>azure</category>
      <category>security</category>
      <category>devops</category>
      <category>career</category>
    </item>
    <item>
      <title>Weekend Grind: Breaking the GUI Habit and Building a Scalable Cloud Fortress in Azure (Day 4 &amp; 5)</title>
      <dc:creator>Abhishek Kadlii</dc:creator>
      <pubDate>Sat, 23 May 2026 13:56:49 +0000</pubDate>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc/weekend-grind-breaking-the-gui-habit-and-building-a-scalable-cloud-fortress-in-azure-day-4-5-241o</link>
      <guid>https://dev.to/abhishek_kadlii_9ef4ca8bc/weekend-grind-breaking-the-gui-habit-and-building-a-scalable-cloud-fortress-in-azure-day-4-5-241o</guid>
      <description>&lt;p&gt;It is Saturday night in Bengaluru. While most people are out roaming around the outer ring road or chilling in cafes, I made a conscious choice to sit at my desk, open up my terminal, and grind. I want to be part of that 1% crowd—the professionals who don’t just talk about growth but are genuinely curious, willing to put in the hours, and execute.&lt;/p&gt;

&lt;p&gt;Over this intense weekend session, I successfully shattered my dependency on the visual Azure Portal (GUI), moved completely into command-line infrastructure automation, and expanded my secure digital sandbox into an enterprise-grade network topology.&lt;/p&gt;

&lt;p&gt;Here is exactly how I built it, the real-world bugs I encountered, and the core architectural concepts broken down so simply that even a non-technical person can understand them.&lt;/p&gt;

&lt;p&gt;🛑Day 4: Moving from "Pointing-and-Clicking" to Code&lt;/p&gt;

&lt;p&gt;Up until yesterday, I built my cloud infrastructure by manually clicking buttons, menus, and checkboxes inside the Azure Portal web interface.&lt;/p&gt;

&lt;p&gt;💡The Analogy: The Hand-Carved Bakery vs. The Smart Machine&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Manual Way (Days 1–3): Imagine baking a cake where you have to manually measure flour, crack every egg, and closely watch the oven dial. This works great for one cake. But what if a major corporate company in Whitefield orders 500 identical cakes for an event? If you try to do it all by hand, it will take forever, you will get exhausted, and some cakes will inevitably taste different due to human error.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Automation Way (Day 4): Imagine programming a digital, industrial smart-mixer. You type in the exact measurements into a script once, press a button, and the machine perfectly outputs 500 identical cakes with zero errors.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the cloud world, we call this Infrastructure as Code (IaC). Enterprise networks are massive; we cannot scale by clicking buttons in a browser. We use text-based scripts to deploy identical, flawless environments in seconds.&lt;/p&gt;

&lt;p&gt;🛠️ The Simplified Command-Line Blueprint&lt;/p&gt;

&lt;p&gt;I opened up the browser-based Azure Cloud Shell and used Azure CLI to fire up my infrastructure using tight, professional shortcut flags:&lt;/p&gt;

&lt;p&gt;-g stands for the Resource Group (our logical container).&lt;br&gt;
-n stands for the Name of our resource.&lt;br&gt;
-l stands for the Location (Southeast Asia/Singapore datacenters).&lt;/p&gt;

&lt;p&gt;Here are the exact three direct commands that built my perimeter security:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;BASH
&lt;span class="c"&gt;# 1. Create the Security Guard Shack (Network Security Group)&lt;/span&gt;
az network nsg create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; Sec_Hub_SEA_NSG &lt;span class="nt"&gt;-l&lt;/span&gt; southeastasia

&lt;span class="c"&gt;# 2. Program the Guard to strictly allow my home ISP IP on Port 22 (SSH)&lt;/span&gt;
az network nsg rule create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--nsg-name&lt;/span&gt; Sec_Hub_SEA_NSG &lt;span class="nt"&gt;-n&lt;/span&gt; Allow_SSH_Home_Only &lt;span class="nt"&gt;--priority&lt;/span&gt; 100 &lt;span class="nt"&gt;--source-address-prefixes&lt;/span&gt; 205.254.163.132 &lt;span class="nt"&gt;--destination-port-ranges&lt;/span&gt; 22

&lt;span class="c"&gt;# 3. Create the Private Network and bind it to the Guard Shack instantly&lt;/span&gt;
az network vnet create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="nt"&gt;-l&lt;/span&gt; southeastasia &lt;span class="nt"&gt;--address-prefixes&lt;/span&gt; 10.0.0.0/16 &lt;span class="nt"&gt;--subnet-name&lt;/span&gt; Management_SEA_Subnet &lt;span class="nt"&gt;--subnet-prefixes&lt;/span&gt; 10.0.1.0/24 &lt;span class="nt"&gt;--nsg&lt;/span&gt; Sec_Hub_SEA_NSG

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔍 The Day 4 Troubleshooting Story: Defeating the Location Clash&lt;/p&gt;

&lt;p&gt;When I first ran my script, Azure halted everything and threw a glaring red error:&lt;/p&gt;

&lt;p&gt;[InvalidResourceLocation] The resource 'Sec_Hub_VNet' already exists in location 'centralindia' in resource group 'Marathahalli_Lab_RG'. A resource with the same name cannot be created in location 'southeastasia'&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0merdx6nk8qqpxh3p29o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0merdx6nk8qqpxh3p29o.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Lesson:&lt;/p&gt;

&lt;p&gt;During my early labs, I had manually created a network named Sec_Hub_VNet inside India. Today, my script tried to create a new network with the exact same name inside Singapore, but within the same resource group wrapper.&lt;/p&gt;

&lt;p&gt;Azure taught me an important architectural lesson here: While a single Resource Group can hold assets from different cities around the world, it absolutely cannot hold two items that share the exact same name.&lt;/p&gt;

&lt;p&gt;The Fix: I modified my automation script variables, changing the name to Sec_Hub_SEA_VNet. The script instantly cleared the validation check and deployed flawlessly.&lt;/p&gt;

&lt;p&gt;🏛️Deep-Dive Concept: How Firewalls Process Cloud Traffic&lt;/p&gt;

&lt;p&gt;As a Network Security Engineer, I had to understand exactly how Azure evaluates firewall rules when we bind them programmatically. &lt;br&gt;
In Azure, you can attach Network Security Groups (NSGs) at two distinct boundaries: the Subnet level (the whole road) and the NIC level (the specific house's front door).&lt;/p&gt;

&lt;p&gt;💡The Analogy: The High-Security Corporate Tech Park&lt;/p&gt;

&lt;p&gt;Imagine visiting a secure corporate client office in Marathahalli:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The Subnet Gate: First, you drive up to the main outer gate of the tech park. Security checks your vehicle. If you are on the list, they let you drive onto the campus (Allow).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The NIC Gate: Next, you walk up to the glass door of Building 3 inside that campus. The security guard at that specific door checks your ID badge and says, "You don't have access to this particular building" (Deny).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Result? You get dropped right there on the floor. You cannot enter. For a packet to reach an application, both security checkpoints must say "Allow".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INBOUND PACKET FLOW:
[Public Internet] ---&amp;gt; ( Subnet NSG: ALLOW ) ---&amp;gt; ( NIC NSG: DENY ) ---&amp;gt; [ Packet Dropped! ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🚀Day 5: Scaling Out to a Hub-and-Spoke Topology&lt;/p&gt;

&lt;p&gt;Once Day 4's automation was rock solid, I immediately jumped into Day 5 to scale my lab into a production-grade architecture. Enterprise companies do not dump everything into a single network. They isolate environments using a Hub-and-Spoke Topology.&lt;/p&gt;

&lt;p&gt;💡The Analogy: The International Airport Terminal&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Hub (Sec_Hub_SEA_VNet): Think of this like the main central airport terminal building. This is where customs officers stand, passport control happens, and bags are scanned. Everything entering or leaving the airport must go through here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Spoke (Sec_Spoke_SEA_VNet): Think of this like the isolated airplane boarding gates far down the hallway. Gate A houses domestic flights; Gate B houses cargo. These gates do not need their own expensive customs setups; they rely entirely on the main central terminal (The Hub) to keep them secure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📊 The Network Topology Map (Architecture Layout)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    [ PUBLIC INTERNET ]

                                |
                                | (Strict Port 22 Lockdown Rule)
                                v
     =================== HUB VNET (10.0.0.0/16) ===================

     |                                                            |
     |   [ Sec_Hub_SEA_NSG ] ---&amp;gt; Applied to Subnet Layer         |
     |            |                                               |
     |            v                                               |
     |   [ Management_SEA_Subnet ] (10.0.1.0/24)                  |
     |                                                            |
     ==============================================================

               |                                      ^
               |                                      |
               |-----&amp;gt; [ Hub-to-Spoke Peering ] ------|
               |       (Status: Connected)            |
               |                                      |
               |-----&amp;gt; [ Spoke-to-Hub Peering ] ------|
               v                                      |
     ================== SPOKE VNET (10.1.0.0/16) ==================

     |                                                            |
     |   [ App_Prod_Subnet ] (10.1.1.0/24)                        |
     |   (Production Database / App Microservices workloads)      |
     |                                                            |
     ==============================================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;💻 Day 5 Code: Line-by-Line Technical Breakdown&lt;/p&gt;

&lt;p&gt;To build this architecture, I executed three specific commands. Here is exactly what each line does under the hood:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creating the Spoke Network Space
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;BASH
az network vnet create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;-n&lt;/span&gt; Sec_Spoke_SEA_VNet &lt;span class="nt"&gt;-l&lt;/span&gt; southeastasia &lt;span class="nt"&gt;--address-prefixes&lt;/span&gt; 10.1.0.0/16 &lt;span class="nt"&gt;--subnet-name&lt;/span&gt; App_Prod_Subnet &lt;span class="nt"&gt;--subnet-prefixes&lt;/span&gt; 10.1.1.0/24
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;az network vnet create: Tells the Azure Resource Manager to carve out a new software-defined virtual network fabric.&lt;/p&gt;

&lt;p&gt;-g Marathahalli_Lab_RG: Places this new network inside my existing resource group container.&lt;/p&gt;

&lt;p&gt;-n Sec_Spoke_SEA_VNet: Names this specific network space our "Spoke".&lt;/p&gt;

&lt;p&gt;--address-prefixes 10.1.0.0/16: Allocates a massive pool of over 65,000 private IPs. Critical detail: This does not overlap with our Hub network (10.0.0.0/16), completely preventing routing collisions.&lt;/p&gt;

&lt;p&gt;--subnet-name App_Prod_Subnet --subnet-prefixes 10.1.1.0/24: Instantly slices out a subset corridor within the Spoke where our actual production application databases and web servers will live.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Building the Walkway: From Hub to Spoke
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;BASH
az network vnet peering create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--vnet-name&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="nt"&gt;-n&lt;/span&gt; Hub-to-Spoke &lt;span class="nt"&gt;--remote-vnet&lt;/span&gt; Sec_Spoke_SEA_VNet &lt;span class="nt"&gt;--allow-vnet-access&lt;/span&gt;
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;az network vnet peering create: Tells Azure to construct a low-latency, private routing bridge directly across the Microsoft backbone network.&lt;/p&gt;

&lt;p&gt;--vnet-name Sec_Hub_SEA_VNet: Specifies the starting point of our bridge (The Hub).&lt;/p&gt;

&lt;p&gt;-n Hub-to-Spoke: Labels this directional leg of the bridge.&lt;/p&gt;

&lt;p&gt;--remote-vnet Sec_Spoke_SEA_VNet: Connects the other end of the bridge straight into our Spoke network asset.&lt;/p&gt;

&lt;p&gt;--allow-vnet-access: Programmatically permits the virtual machines inside the Hub to talk across this bridge natively.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Completing the Two-Way Street: From Spoke to Hub
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="sb"&gt;`&lt;/span&gt;BASH
az network vnet peering create &lt;span class="nt"&gt;-g&lt;/span&gt; Marathahalli_Lab_RG &lt;span class="nt"&gt;--vnet-name&lt;/span&gt; Sec_Spoke_SEA_VNet &lt;span class="nt"&gt;-n&lt;/span&gt; Spoke-to-Hub &lt;span class="nt"&gt;--remote-vnet&lt;/span&gt; Sec_Hub_SEA_VNet &lt;span class="nt"&gt;--allow-vnet-access&lt;/span&gt;
&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Why this line is mandatory: In cloud architecture, a peering connection is not automatically bidirectional. It is a one-way street until you configure the return path. This command sets the starting point at the Spoke (--vnet-name Sec_Spoke_SEA_VNet) and maps it right back to the Hub (--remote-vnet Sec_Hub_SEA_VNet), completing the secure loop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdtiu8acp0ya60fg5hc29.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdtiu8acp0ya60fg5hc29.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💰Financial Discipline Check&lt;/p&gt;

&lt;p&gt;Since I only deployed logical networking paths, subnets, and routing bridges without provisioning any heavy virtual machine CPU power today, my automated environment runs at a cost of exactly ₹0 per hour. My Azure free trial credits remain 100% optimized and safe.&lt;/p&gt;

&lt;p&gt;🏁Weekend Wrap-Up&lt;/p&gt;

&lt;p&gt;This weekend was a massive leap forward. By stepping completely out of the comfort zone of the graphical portal, writing raw CLI scripts, conquering real-world resource location bugs, and standing up a verified Hub-and-Spoke enterprise topology, I am actively building the real-world skills needed to command senior cloud security roles.&lt;/p&gt;

&lt;p&gt;The grind continues, where we will start hijacking these default routing paths using User-Defined Routes (UDRs) to force all traffic through a centralized firewall!&lt;/p&gt;

&lt;p&gt;Onward and upward!🚀🔥&lt;/p&gt;

</description>
      <category>azure</category>
      <category>security</category>
      <category>devops</category>
      <category>career</category>
    </item>
    <item>
      <title>🚀 My First Day in the Cloud: How I Built a Secured Digital Fortress in Azure</title>
      <dc:creator>Abhishek Kadlii</dc:creator>
      <pubDate>Fri, 22 May 2026 07:41:14 +0000</pubDate>
      <link>https://dev.to/abhishek_kadlii_9ef4ca8bc/my-first-day-in-the-cloud-how-i-built-a-secured-digital-fortress-in-azure-3aka</link>
      <guid>https://dev.to/abhishek_kadlii_9ef4ca8bc/my-first-day-in-the-cloud-how-i-built-a-secured-digital-fortress-in-azure-3aka</guid>
      <description>&lt;p&gt;Many people think learning "Cloud Computing" means watching videos and memorizing words. But to actually become a real engineer, you have to get your hands dirty.&lt;/p&gt;

&lt;p&gt;Today was my very first day building live systems inside Microsoft's global network (Azure). I didn't just build a cloud computer; I wrapped it in high-tech security gates to protect it from hackers.&lt;/p&gt;

&lt;p&gt;Here is exactly what I did, told in plain, simple English.&lt;/p&gt;

&lt;p&gt;🏰 The Analogy: Building a Secret Bank Vault&lt;/p&gt;

&lt;p&gt;To understand what I built today, imagine you want to rent a secure vault inside a giant, high-tech fortress (the Cloud Data Center) to store important data.&lt;/p&gt;

&lt;p&gt;[ Hacker / Stranger ] ────► ❌ &lt;a href="https://dev.toEnforces%20MFA"&gt; Main Security Guard &lt;/a&gt;&lt;br&gt;
                                     │&lt;br&gt;
[ Abhishek's Laptop ] ────► ✅ &lt;a href="https://dev.toChecks%20Your%20Home%20IP%20Address"&gt; Private Gatehouse &lt;/a&gt;&lt;br&gt;
                                     │&lt;br&gt;
                                     ▼ (Bypassed Router Block via Secret Tunnel)&lt;br&gt;
                              ┌──────────────┐&lt;br&gt;
                              │ Inside Vault │ ──► [ Your Ubuntu Linux Server ]&lt;br&gt;
                              └──────────────┘&lt;br&gt;
Here are the 4 steps I took to build it:&lt;/p&gt;

&lt;p&gt;🚪 Step 1: Hiring the Ultimate Security Guard (MFA)&lt;/p&gt;

&lt;p&gt;Before building my vault, I hired a digital security guard for my main account. I turned on a feature called Security Defaults.&lt;/p&gt;

&lt;p&gt;What it means: Think of it like a guard at the front door who checks IDs. If anyone tries to guess my password, the guard stops them instantly and sends a verification code straight to my personal phone. This keeps the bad guys completely out of my account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7r2lq7j7mcj028l8fztr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7r2lq7j7mcj028l8fztr.png" alt=" " width="602" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🧱 Step 2: Building a Private Gatehouse (The Firewall / NSG)Next, I built a private wall around my vault. In the tech world, this is called a Network Security Group (NSG). It acts like a smart gatehouse with a very specific rulebook.&lt;/p&gt;

&lt;p&gt;The Rule: I told the gatehouse, "Only let someone in if they are coming from Abhishek's exact home Wi-Fi address." If a hacker from anywhere else in the world tries to knock on the door, the gatehouse completely ignores them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyles2fkrhsapz4f9q8h5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyles2fkrhsapz4f9q8h5.png" alt=" " width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💻 Step 3: Launching the Computer (The Virtual Machine)Once the security walls were up, I ordered a fresh Linux computer (called a Virtual Machine) to live inside my vault.&lt;/p&gt;

&lt;p&gt;The Real-World Twist: At first, the local data centers in India were completely full because so many people were using them! Instead of giving up, I used the power of the cloud to instantly teleport my project across the ocean to Singapore, where there was plenty of room. It worked perfectly and cost me next to nothing from my free credits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5zjzpcwt9u9puab3pibo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5zjzpcwt9u9puab3pibo.png" alt=" " width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🛠️ Step 4: Solving a Hidden Problem (The Serial Console)This was the most exciting part of the day. When I tried to log into my new Singapore computer from my laptop, the connection kept freezing.&lt;/p&gt;

&lt;p&gt;The Problem: It turns out my home internet router is highly restrictive. It blocks the standard pipe (called Port 22) used to connect to Linux computers.&lt;/p&gt;

&lt;p&gt;The Fix: Instead of calling my internet provider to complain, I used a secret Azure back-door tool called the Serial Console. It allowed me to bypass my home router's restriction and open a direct command-line window to my server right inside my Google Chrome browser tab!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F991piqcct07jmf00t5gm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F991piqcct07jmf00t5gm.png" alt=" " width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💰 Saving Money: Turning off the Lights&lt;/p&gt;

&lt;p&gt;Because the cloud operates on a "pay-for-what-you-use" model, keeping the computer running when I'm not using it would waste my free credits. To practice good discipline, I hit the Stop (Deallocate) button. This completely shuts down the physical computer in Singapore, dropping my hourly cost to exactly ₹0 until I turn it back on tomorrow.&lt;/p&gt;

&lt;p&gt;🏆 Why this matters&lt;/p&gt;

&lt;p&gt;Today, I proved that I can:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Lock down a cloud environment so hackers can't get in.&lt;/li&gt;
&lt;li&gt;Adapt and move my infrastructure across the globe when resources are full.&lt;/li&gt;
&lt;li&gt;Troubleshoot tricky network blocks like a real professional.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
  </channel>
</rss>
