























Accessing files on a Windows machine remotely typically requires exposing ports to the internet, setting up a traditional VPN, or relying on third-party cloud sync services. This can introduce security risks, configuration complexity, or dependency on external platforms.
NetBird offers a different approach. By creating a WireGuard-based mesh network with zero-trust access controls, you can securely access your Windows file shares from anywhere without opening ports or exposing services to the public internet.
This guide covers two methods for remote file share access:
Windows file sharing uses the Server Message Block (SMB) protocol over TCP port 445. When configuring NetBird access policies later in this guide, you'll restrict access to this specific port rather than allowing all traffic between peers.
Legacy Windows systems may also use port 139 (NetBIOS), but modern Windows networking relies primarily on port 445.
Before setting up NetBird, configure the folder you want to share on your Windows machine.

You'll need either:
For the direct peer-to-peer method, you'll use the NetBird-assigned IP instead. For the routing peer method, you'll use the local LAN IP.
This method installs NetBird directly on the Windows machine hosting the share. Both devices connect through an encrypted WireGuard tunnel with no intermediary.
Once connected, your Windows machine appears in the NetBird dashboard under Peers. Note the assigned NetBird IP (typically in the range).
Repeat the installation process on the device you'll use to access the share remotely:
For platform-specific instructions, see the NetBird installation documentation .
By default, NetBird creates a permissive policy allowing all peers to communicate. For better security, create a specific policy for file share access. Learn more about groups and access policies .

This policy allows only devices in the clients group to initiate SMB connections to the Windows host. The Windows machine cannot initiate connections back to client devices on this port.
From your client device, connect to the share using the Windows machine's NetBird IP (not its local LAN IP):
Windows client:
Or open File Explorer and type the path in the address bar.
macOS:
Linux:
Replace with your Windows machine's actual NetBird IP shown in the dashboard.

If you already have a NetBird node running on your network, you can use it as a routing peer to access resources on your LAN without installing NetBird on each machine.
This approach is useful when:
The routing peer sits on your LAN and advertises a route to your local subnet through NetBird. When a remote client wants to access (your Windows machine's LAN IP), traffic flows:
The Windows machine sees connections coming from the routing peer's LAN IP, not from NetBird IPs.
If you don't already have a NetBird peer on your network, check out the installation documentation . Then login with SSO or generate a setup key from the NetBird dashboard under Setup Keys for headless installation.
NetBird's Networks feature (available in version 0.35.0+) replaces the older Network Routes and provides better resource management.
From your remote client device (connected to NetBird), access the Windows share using its local LAN IP:
Windows client:
macOS:
Linux:
The routing peer handles forwarding traffic between the NetBird mesh and your local network.
Unlike a dedicated server, a typical Windows desktop may enter sleep or hibernation mode after periods of inactivity. When the machine suspends, the network adapter powers down and your shared folders become inaccessible—even though NetBird remains configured correctly.
If you need reliable, always-available access to your Windows file shares, consider these adjustments to keep the machine running like a server.
Open Settings → System → Power & battery (or Power Options in Control Panel) and set the following:
For more granular control, open an elevated Command Prompt and run:
Windows' balanced power plan may still aggressively sleep components. Switch to High Performance:
Windows can power down network adapters to save energy, which kills remote connections:
Repeat for both wired and wireless adapters if applicable.
If you'd rather let the machine sleep and wake it on demand, configure Wake-on-LAN (WoL):
You can then send a magic packet from another device on your network (or through your routing peer) to wake the Windows machine. Note that WoL typically only works within the same broadcast domain, so the routing peer method is required if waking remotely through NetBird.
The NetBird Windows client installs as a system service that starts automatically with Windows. Verify it's configured correctly:
If the service stops unexpectedly, check the Windows Event Viewer for errors.
The access policies created in this guide restrict access to TCP port 445 only. Avoid using the default "All" policy in production environments, as it creates a full mesh where every peer can reach every other peer on all ports.
NetBird supports posture checks that can enforce additional requirements before allowing connections, such as:
Consider enabling posture checks for sensitive file shares.
NetBird logs connection events in the dashboard. Review the activity logs periodically to identify unexpected access patterns.
NetBird provides a straightforward path to secure remote file access without the complexity of traditional VPNs or the exposure of port forwarding. The zero-trust policy model ensures only authorized devices can reach your resources.
For more advanced configurations, including DNS-based routing, high-availability setups with multiple routing peers, and integration with identity providers, consult the NetBird documentation .
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。