INC-3161 · P2 · Azure · Azure Files · SMB 3 · Point de terminaison privé · VPN Gateway point-à-site · PowerShell · Azure CLI

Step-by-step fix: The East branch can no longer open the shared drive holding student files

A production incident replayed in a simulated terminal, with its complete resolution: the commands the on-call engineer ran, what they printed, the root cause and the fix. This is exactly the reasoning expected in a DevOps, SRE or Linux administrator job interview.

Try it yourself first in the terminal (free)

The ticket

The MasterLinux branches store enrolment files (scanned ID documents, contracts, certificates) in an Azure Files share: \\stmlagences.file.core.windows.net\documents, mounted as Z: on every workstation.

This weekend, the East branch moved into new premises, with a new fibre router from a different Internet service provider. This morning, no workstation can mount Z: any more. The headquarters and the Azure VMs access it without any problem. Twelve enrolments are planned today and the team can neither save nor view the files.

You are in support, connected to the branch workstation ml-poste-07 (Windows 11, PowerShell, Azure CLI installed). The MasterLinux point-to-site VPN profile is installed on the branch workstations, but nobody usually uses it.

Step by step: the commands and their output

These are the commands the engineer typed, in order, with what the machine answered.

  1. PS C:\Users\support> net use Z: \\stmlagences.file.core.windows.net\documents /persistent:yes
    System error 53 has occurred.
    
    The network path was not found.
  2. PS C:\Users\support> cmdkey /list
    Currently stored credentials:
    
        Target: Domain:target=stmlagences.file.core.windows.net
        Type: Domain Password
        User: localhost\stmlagences
        Local machine persistence
    
    (Simulation: the stored password matches key1, starting with Zk3v, unchanged since 2 March.)
  3. PS C:\Users\support> az storage account keys list -g rg-agences -n stmlagences
    [
      {
        "creationTime": "2026-03-02T10:41:18.553201+00:00",
        "keyName": "key1",
        "permissions": "FULL",
        "value": "Zk3v…Qw=="
      },
      {
        "creationTime": "2026-03-02T10:41:18.553201+00:00",
        "keyName": "key2",
        "permissions": "FULL",
        "value": "p9Rb…Ag=="
      }
    ]
  4. PS C:\Users\support> az storage share-rm list -g rg-agences --storage-account stmlagences -o table
    Name       Kind                                      QuotaGiB    EnabledProtocols    AccessTier    ResourceGroup
    ---------  ----------------------------------------  ----------  ------------------  ------------  ---------------
    documents  Microsoft.Storage/storageAccounts/fileServices/shares  1024  SMB         TransactionOptimized  rg-agences
  5. PS C:\Users\support> az storage account show -g rg-agences -n stmlagences --query "{public:publicNetworkAccess, regles:networkRuleSet}"
    {
      "public": "Enabled",
      "regles": {
        "bypass": "AzureServices",
        "defaultAction": "Deny",
        "ipRules": [
          { "action": "Allow", "ipAddressOrRange": "196.200.131.18" },
          { "action": "Allow", "ipAddressOrRange": "105.159.47.82" }
        ],
        "virtualNetworkRules": []
      },
      "privateEndpointConnections": [
        {
          "name": "pe-stmlagences-file.6c1e9a3b",
          "privateLinkServiceConnectionState": { "status": "Approved" }
        }
      ]
    }
  6. PS C:\Users\support> az vm run-command invoke -g rg-agences -n ml-app-01 --command-id RunPowerShellScript --scripts "Test-NetConnection stmlagences.file.core.windows.net -Port 445; net use Y: \\stmlagences.file.core.windows.net\documents"
    {
      "value": [
        {
          "code": "ComponentStatus/StdOut/succeeded",
          "displayStatus": "Provisioning succeeded",
          "level": "Info",
          "message": "ComputerName     : stmlagences.file.core.windows.net\nRemoteAddress    : 10.20.1.5\nRemotePort       : 445\nInterfaceAlias   : Ethernet\nSourceAddress    : 10.20.4.11\nTcpTestSucceeded : True\n\nDrive Y: is now connected to \\\\stmlagences.file.core.windows.net\\documents.\nThe command completed successfully.",
          "time": null
        },
        {
          "code": "ComponentStatus/StdErr/succeeded",
          "displayStatus": "Provisioning succeeded",
          "level": "Info",
          "message": "",
          "time": null
        }
      ]
    }
  7. PS C:\Users\support> Resolve-DnsName stmlagences.file.core.windows.net
    Name                           Type   TTL   Section    NameHost
    ----                           ----   ---   -------    --------
    stmlagences.file.core.windows.net CNAME 60  Answer     stmlagences.privatelink.file.core.windows.net
    stmlagences.privatelink.file.core.windows.net CNAME 60 Answer file.par21prdstr03a.store.core.windows.net
    
    Name       : file.par21prdstr03a.store.core.windows.net
    QueryType  : A
    TTL        : 60
    Section    : Answer
    IP4Address : 20.60.153.72
  8. PS C:\Users\support> Test-NetConnection -ComputerName stmlagences.file.core.windows.net -Port 445
    WARNING: TCP connect to (20.60.153.72 : 445) failed
    WARNING: Ping to 20.60.153.72 failed with status: TimedOut
    
    
    ComputerName           : stmlagences.file.core.windows.net
    RemoteAddress          : 20.60.153.72
    RemotePort             : 445
    InterfaceAlias         : Ethernet
    SourceAddress          : 192.168.1.23
    PingSucceeded          : False
    PingReplyDetails (RTT) : 0 ms
    TcpTestSucceeded       : False
  9. PS C:\Users\support> Test-NetConnection -ComputerName stmlagences.file.core.windows.net -Port 443
    ComputerName     : stmlagences.file.core.windows.net
    RemoteAddress    : 20.60.153.72
    RemotePort       : 443
    InterfaceAlias   : Ethernet
    SourceAddress    : 192.168.1.23
    TcpTestSucceeded : True
  10. PS C:\Users\support> Get-VpnConnection
    Name                  : VPN-MasterLinux-Azure
    ServerAddress         : azuregateway-4f1c7a2e-9b3d-4e6a-8c0f-1d5e7a9b3c24-61a0e2b9d7f3.vpn.azure.com
    AllUserConnection     : True
    Guid                  : {6A2E8C1F-3B5D-4F7A-9E0C-2D4B6F8A1C3E}
    TunnelType            : Sstp
    AuthenticationMethod  : {MachineCertificate}
    EncryptionLevel       : Required
    L2tpIPsecAuth         :
    UseWinlogonCredential : False
    EapConfigXmlStream    :
    ConnectionStatus      : Disconnected
    RememberCredential    : True
    SplitTunneling        : True
    DnsSuffix             : masterlinux.lab
    IdleDisconnectSeconds : 0
  11. PS C:\Users\support> rasdial "VPN-MasterLinux-Azure"
    Connecting to VPN-MasterLinux-Azure...
    Verifying username and password...
    Registering your computer on the network...
    Successfully connected to VPN-MasterLinux-Azure.
    Command completed successfully.
  12. PS C:\Users\support> Resolve-DnsName stmlagences.file.core.windows.net
    Name                           Type   TTL   Section    NameHost
    ----                           ----   ---   -------    --------
    stmlagences.file.core.windows.net CNAME 60  Answer     stmlagences.privatelink.file.core.windows.net
    
    Name       : stmlagences.privatelink.file.core.windows.net
    QueryType  : A
    TTL        : 10
    Section    : Answer
    IP4Address : 10.20.1.5
  13. PS C:\Users\support> Test-NetConnection -ComputerName stmlagences.file.core.windows.net -Port 445
    ComputerName     : stmlagences.file.core.windows.net
    RemoteAddress    : 10.20.1.5
    RemotePort       : 445
    InterfaceAlias   : VPN-MasterLinux-Azure
    SourceAddress    : 172.16.201.2
    TcpTestSucceeded : True
  14. PS C:\Users\support> net use Z: \\stmlagences.file.core.windows.net\documents /persistent:yes
    Drive Z: is now connected to \\stmlagences.file.core.windows.net\documents.
    
    The command completed successfully.

What the commands revealed

Root cause

The branch's new Internet provider blocks outbound traffic to TCP port 445 (SMB): the connection never reaches Azure

“System error 53” means Windows could not even open a connection to the SMB server: authentication has not been reached yet. From the branch, Test-NetConnection -Port 445 fails while port 443 of the same account answers: Azure is reachable, only outbound port 445 is filtered along the way. This is a common practice among consumer Internet providers (port 445 was used by large worm outbreaks), and it is exactly what changed this weekend with the new router.

The key has been the same since March (and it works from the Azure VM), the share exists and the account firewall allows the branch's address: a key error would give “Access is denied” (error 5 or 86), a firewall refusal or a missing share an error after the TCP connection.

Analysis and fix

Immediate fix: route SMB through the MasterLinux point-to-site VPN, which lands in the VNet where the account's private endpoint lives:

  • rasdial "VPN-MasterLinux-Azure";
  • check that the name now resolves to a private address (Resolve-DnsName stmlagences.file.core.windows.net → 10.20.1.5) and that Test-NetConnection … -Port 445 succeeds;
  • remount the drive: net use Z: \\stmlagences.file.core.windows.net\documents /persistent:yes.

To prevent it from happening again:

  • a permanent VPN for the branch: a site-to-site tunnel from the router (or an “Always On” VPN on the workstations) instead of SMB access over the Internet;
  • or Azure File Sync on a small local server in the branch, which keeps a cache and only talks to Azure over HTTPS (443);
  • eventually, disable public access on the account (publicNetworkAccess Disabled) to accept only the private endpoint;
  • add “outbound port 445 open” to the checklist of every move or router change.

In a job interview

This kind of outage often comes up in technical interviews ("the site returns an error, what do you do?"). What is assessed: start from the symptoms, check each layer with the right command, prove the cause before fixing it, then prevent it from happening again. MasterLinux trains you on 195 incidents like this one, from beginner to expert.

Try it yourself first in the terminal (free)

Unlock every production simulation

AWS, Azure, Google Cloud, on-premise and multi-cloud, from Beginner to Extreme: the real incidents of IT service companies and large IT organisations, available for a year.

Other free walkthroughs