MidNetworking

An Azure VM cannot connect to an Azure SQL Database. Walk me through how you debug the networking.

What they are really testing: Whether you can debug cloud networking methodically, layer by layer, on Azure specifically (NSGs, the SQL firewall, private endpoints), instead of randomly toggling settings.

A real interview question

An Azure VM cannot connect to an Azure SQL Database. Walk me through how you debug the networking.

What most people say

drag me

I would restart the VM and the database and see if it connects.

Networking failures are deterministic, not flaky; restarting changes nothing and shows no mental model of the path. It skips the SQL firewall and NSGs, the actual usual causes.

The follow-ups they ask next

  • You added a Private Endpoint but the VM still resolves the DB to a public IP. Why?

    Private DNS: the private endpoint needs the privatelink DNS zone linked to the VNet so the DB’s FQDN resolves to the private IP. Without that DNS integration, the name still returns the public endpoint.

  • How would you have caught this before it hit production?

    Infrastructure as code with the NSG rules, firewall rules, and private endpoint defined and reviewed; a connectivity smoke test in the pipeline; not click-ops in the portal.

What the interviewer is listening for

  • Narrows the failure layer first
  • Knows Azure SQL has its own firewall
  • Reaches for a Private Endpoint + private DNS

What sinks the answer

  • Restart-and-pray
  • Forgets the SQL-side firewall
  • Can't separate networking from auth

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

I’d narrow it to [DNS / TCP 1433 / auth] first. Check [the Azure SQL server firewall, which denies by default], then [the NSG allows outbound 1433]. For prod I’d use [a Private Endpoint + private DNS zone] so it’s a private IP. Remaining failures are then [auth, not networking].

Keep going with networking

All 336 cloud engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free