NetLock RMMNetLock RMM Docs
III — How-To Guides

Reach a file share (SMB) over NetMesh

Open a Windows or Samba file share on another device through a NetMesh link or service network, why port 445 does not work on Windows client devices, and what the port conflict hints in the console mean.

Reach a file share (SMB) over NetMesh

NetMesh makes a TCP service on (or behind) one device reachable through a local port on another device. File shares use SMB on TCP port 445. This guide explains which local port to use, how to connect from Windows, Linux and macOS, and what the console tells you when the local port cannot be opened.

The device that opens the local port and connects is the client device (in a service network: a consumer). The device the share runs on, or that reaches the file server, is the service device (in a service network: the publisher).

Before you start

  • Both devices are online and run a current agent.
  • Required permissions: netmesh_enabled and netmesh_add (create a link or service), netmesh_edit (change one).
  • The file share itself works on the service device or on the file server behind it. NetMesh passes the SMB traffic through unchanged, including SMB signing and encryption.

Why port 445 does not work on a Windows client device

On Windows, the built-in file sharing (the "Server" service, which runs in the kernel) always listens on TCP 445, and on 139 for NetBIOS. No other program can open these ports, also not on 127.0.0.1 or on a service network's 127.x.y.z address. A link with local port 445 on a Windows client device therefore stays in the status Port not available. A jump host does not change this: it only changes where the service device connects to, the client device still tries to open 445 locally.

On Linux and macOS, 445 works as long as no local Samba server or macOS "File Sharing" uses it.

Use a different local port, for example 1445. The SMB preset of a service network proposes 1445 for this reason.

  1. On the NetMesh page, click Create link.

  2. Choose the client device and the service device, and pick the SMB service (service port 445). If the share is on another server in the service device's network, enter that server as the target host.

  3. Set Local port to 1445 and Listen on to Only this device (127.0.0.1).

  4. Save and wait until the link shows as established.

  5. On the client device, open an elevated command prompt or PowerShell and connect:

    net use X: \\127.0.0.1\share /TCPPORT:1445

    or

    New-SmbMapping -LocalPath X: -RemotePath \\127.0.0.1\share -TcpPort 1445

Connecting to an SMB server on another port is only possible from Windows 11 24H2 and Windows Server 2025 on. Administrators can control it with the group policy Computer Configuration > Administrative Templates > Network > Lanman Workstation > Enable alternative ports. Explorer and a plain \\host\share path always use port 445; the alternative port is only available through net use /TCPPORT and New-SmbMapping -TcpPort.

Note: If the mapping fails, check the GPO above and that the link shows as established.

Service networks and hostnames on Windows

A service network gives each service a hostname that points to a 127.x.y.z address on the consumer. On Windows, connect to a file share through a manual link on 127.0.0.1 as described above.

Warning: When the local port of a service network cannot be opened on a Windows consumer, its hostname still points to the 127.x.y.z address, and Windows' own file sharing answers there. Opening \\hostname then lands on the consumer itself: you see its own shares or get a sign-in error. Fix the local port first.

Older Windows versions

Windows 10 and Windows 11 before 24H2, as well as Windows Server 2022 and older, cannot connect to SMB on another port. Alternatives:

  • Copy the files with the file transfer of the remote session, or use RDP over NetMesh and work on the service device.
  • Use a Linux or macOS device as the client device.
  • Stopping the Windows "Server" service (LanmanServer) frees port 445, but it also disables the administrative shares (C$, ADMIN$), printer sharing and parts of remote management on that device. This is your own decision and not recommended.

Linux and macOS

With local port 1445 (or 445 when it is free on the client device):

# Linux
smbclient //127.0.0.1/share -p 1445 -U user
sudo mount -t cifs //127.0.0.1/share /mnt/share -o port=1445,username=user

# macOS
mount_smbfs //user@127.0.0.1:1445/share /Volumes/share

In the macOS Finder use Go > Connect to Server with smb://127.0.0.1:1445/share. For a service network, use its hostname instead of 127.0.0.1.

Sign-in: Kerberos and NTLM

Through 127.0.0.1 or a service network hostname, Windows cannot use Kerberos for the file server and falls back to NTLM. When NTLM is blocked on the client device (an option from Windows 11 24H2 on, off by default), the connection fails. Kerberos works when the client device reaches the share under the file server's real name, for example through a hosts-file entry in a domain.

Port conflicts: what the console hints mean

When a link cannot open its local port, the link shows Port not available on the NetMesh page. The link details show the operating system's message and, with a current agent, a hint with the reason:

HintMeaningWhat to do
Another program uses the portA program or service on the client device already listens on the local port.Choose a different local port.
Windows reserves the portThe port lies in an excluded port range on Windows, typically reserved by Hyper-V, WinNAT or Docker.Choose a different local port. List the ranges with netsh int ipv4 show excludedportrange protocol=tcp.
Port used by the NetLock agentPorts 7337 and 7338 are reserved for the NetLock agent.Choose a different local port.
Windows file sharing holds the portLocal port 445 or 139 on a Windows client device.See the sections above.

With the netmesh_edit permission, the hint offers Change local port. For a manual link it opens the link; for a service network it opens the service. A service's local port applies to all consumers of the service, so a conflict on one consumer means changing the port for all of them.

After the change, the application on the client device must connect to the new port: for example net use ... /TCPPORT:<port>, mount -o port=<port>, or the port in the application's connection settings.

Note: The reason hints need a current server and a current agent on the client device. Without them, the console shows the operating system's message, and for port 445/139 on Windows the file-sharing hint.