|What is SMB, SAMBA, and NFS?



The Server Message Block (SMB) protocol is a network file sharing protocol that allows applications on a computer to read and write to files and to request services from server programs in a computer network. The SMB protocol can be used on top of its TCP/IP protocol or other network protocols. Using the SMB protocol, an application (or the user of an application) can access files or other resources at a remote server. This allows applications to read, create, and update files on the remote server. SMB can also communicate with any server program that is set up to receive an SMB client request.



How SMB Works?

At a high level, SMB communication is easy to understand. SMB clients connect to an SMB server using the SMB port to access SMB shares. Once they access the SMB shares, clients can do things such as collaborate on files without downloading them to their machines or print using a networked printer.


What is an SMB client?

An SMB client is the device that accesses resources on an SMB server. For example, within a corporate network, the user PCs that access a shared drive are SMB clients.


What is an SMB server?

An SMB server is the network server — or cluster of servers — where SMB shares are stored. The SMB server grants or denies SMB clients access to the shared resources (a.k.a. SMB shares).


What is an SMB Share?

An SMB share, also known as an SMB file share, is simply a shared resource on an SMB server. Often, an SMB share is a directory, but it can be any shared resource. For example, network printers are often shared using SMB.


What is an SMB Port?

By default, modern implementations of SMB use TCP port 445 as the SMB port. Older SMB implementations (pre-Windows 2000) used SMB port 139.



Is SMB Secure?

With attacks like WannaCry and NotPetya making the news in recent years, you may wonder if SMB is secure. Of course, as with most network protocols,

whether or not SMB is secure depends on your version and implementation. Generally speaking, SMB today is a highly secure protocol. For modern SMB implementations, here are some key takeaways for securing SMB:

  1. Do NOT use SMBv1. SMB1 lacks encryption, is inefficient, and has been exploited in the wild by ransomware attacks.

  2. Prefer SMB3 or later whenever possible. Of the 3 major SMB versions, SMB3 — particularly SMB 3.1.1 — offers the most security. For example, SMB3’s secure dialect negotiation limits susceptibility to man-in-the-middle (MITM) attacks and SMB 3.1.1 uses secure and performant encryption algorithms like AES-128-GCM.

  3. Restrict SMB access to trusted networks and clients. Only allowing connections from trusted LANs or clients and implementing tight network security policies for SMB access can greatly reduce your attack surface.

Note: SMB Servers and SMB Clients will use the latest version they BOTH support. Therefore, you must consider both the server and client SMB software when securing SMB implementations.



Practical applications

  • File storage for virtualization (Hyper-V™ over SMB).
  • Hyper-V can store virtual machine files, such as configuration, Virtual hard disk (VHD) files, and snapshots, in file shares over the SMB 3.0 protocol.
  • Microsoft SQL Server over SMB.
  • SQL Server can store user database files on SMB file shares. Currently, this is supported with SQL Server 2008 R2 for stand-alone SQL servers. Upcoming versions of SQL Server will add support for clustered SQL servers and system databases.
  • Traditional storage for end-user data.
  • The SMB 3.0 protocol provides enhancements to the Information Worker (or client) workloads. These enhancements include reducing the application latencies experienced by branch office users when accessing data over wide area networks (WAN) and protecting data from eavesdropping attacks. (Eavesdropping attacks in the cybersecurity world are when the perpetrator “listens” to and records data that is transmitted between two devices)


Samba visuality Systems: Comparing the popular SMB software options

In non-Windows environments, two of the most popular choices for SMB client and server software are the open-source GPL v3 Samba and commercial solutions from Visuality Systems.



What is Network File System (NFS) File Share?

NFS, or Network File System, is a collaboration system developed by Sun Microsystems in the early 80s that allows users to view, store, update or share files on a remote computer as though it was a local computer.

The first version of NFS was used as an internal process for employees of Sun, and it wasn’t until version two was released that the public could start to benefit from its features. When NFS version two was released to the public, it was used extensively for file sharing, particularly with UNIX operating systems.

Each iteration of NFS has brought increased capabilities to the system, including increased file size limits and improved security measures, like the addition of Kerberos as a network authentication protocol.


Benefits of NFS File Share

Apart from allowing local access to remote files, NFS is most notable for its host authentication, it’s simple to do and makes it possible to connect to another service using an IP address only.

Additional benefits of NFS file share include:

  • NFS provides a central management

  • NFS allows for a user to log into any server and have access to their files transparently

  • It’s been around for a long time, so it comes with familiarity in terms of applications

  • No manual refresh needed for new files

  • Can be secured with firewalls and Kerberos


  • Source: microsoft
  • Wrote: February 28, 2023 | Esfand 9, 1401
  • Updated:
  • Posted: February 28, 2023 | Esfand 9, 1401