Mount an Azure VM as a Samba share onto my local Mac

Michael Hengeli 1 Reputation point

I have an Azure VM machine running Ubuntu 18.04-LTS.

I'd like to create an smb fileshare folder on the VM and then mount that folder on my local Mac. I have attempted to install samba on the VM and have it running with a created file share folder. I've used ufw to allow samba and its ports (139 and 445).

I am attempting to mount the file share using the public IP of the VM but I don't get a connection. Nmap does not show those ports open, even though the actual VM shows ufw active and allowing them.

Is there a service available that can allow me to connect to the VNet that my VM is running on? Is there another firewall layer that is blocking Samba to the public IP?

Thanks, I'm new to using Azure and to LInux as well.

Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
366 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
1,268 questions
{count} votes

1 answer

Sort by: Oldest
  1. Andreas Baumgarten 67,616 Reputation points MVP

    Hi @Michael Hengeli ,

    you should check if a Network Security Group (NSG) is associated with your VM or/and Azure vNet Subnet.
    If so, appropriate inbound access rules must be defined for the ports.


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Andreas Baumgarten