👍 What we like
- No port to open on the router, NAT is traversed automatically.
- End-to-end encrypted traffic with WireGuard.
- Stable 100.x.y.z address and MagicDNS name, no dynamic DNS or domain needed.
- Fine-grained access control with tags and grants.
👎 What to watch
- Relies on Tailscale's (closed-source) coordination service and an identity provider.
- On DSM 7, TUN mode requires a scheduled task that must be rerun after every package update.
- Tailscale SSH is not supported on Synology.
- Every client device needs Tailscale installed.
📑 Contents ▾
- 01 Why a commercial VPN does not give you access to your NAS
- 02 Tailscale or another solution?
- 03 How Tailscale connects your devices
- 04 Prerequisites and hardware
- 05 Install and configure Tailscale step by step
- 06 Final checks
- 07 What you should never expose to the Internet
- 08 Troubleshooting common errors
- 09 Tailscale alternatives in detail
- 10 FAQ
- Our picks
To reach your NAS from outside, you need a VPN whose other end is at your home: a commercial VPN such as NordVPN or Proton VPN sends you out to the Internet, it does not bring you into your local network. In most cases, the simplest solution is Tailscale: the NAS, the laptop and the smartphone join an encrypted, WireGuard-based private network, with no port forwarding at all on the router. This guide details its installation on a Synology running DSM 7 and on a Linux NAS, then reviews the other options (self-hosted WireGuard, Headscale, ZeroTier, vendor remote access, reverse proxy) and what each one exposes to the Internet.
Why a commercial VPN does not give you access to your NAS
A commercial VPN sets up an encrypted tunnel between your device and one of the provider’s servers, from which your traffic leaves for the Internet. The sites you visit see that server’s IP address, and your ISP or the operator of a public Wi-Fi network can no longer see which sites you browse. That is useful for browsing privacy, not for getting back home.
Your NAS sits behind your router, on your local network, and the provider’s server has no tunnel to your home. Connecting to a commercial VPN from a hotel brings you no closer to your SMB shares or to the DSM or QTS interface: you need an endpoint inside your own network, one that you control.
If you also want to protect your browsing on a dubious Wi-Fi network, a private VPN can handle that. By default, Tailscale only carries traffic between your devices, but it lets you designate a machine on your network, the NAS for example, as an “exit node”: all your Internet traffic then goes through your home connection.
Tailscale or another solution?
There are two families of private VPNs. Mesh VPNs (Tailscale, Headscale, ZeroTier) connect each of your devices to a private network; a coordination service helps them find each other and get through the router’s NAT. Classic VPN servers (WireGuard, OpenVPN) run on a machine on your network and wait for connections on a port forwarded from the router, which requires a public IP address. On top of these come the remote access services offered by NAS vendors, and the reverse proxy, which publishes an application rather than the NAS.
| Solution | Port to forward at home | Third-party service required | Client side | Access to the rest of the local network |
|---|---|---|---|---|
| Tailscale | None | Tailscale coordination (DERP relays if needed) | Tailscale client | Yes, through a subnet router |
| Self-hosted WireGuard | 1 UDP port, public IP required | None | WireGuard client | Yes, depending on configuration |
| Headscale | None at home, but a public HTTPS server (443) | None (you host it) | Tailscale client | Yes, through a subnet router |
| ZeroTier | None in general | ZeroTier roots, hosted controller or your own | ZeroTier client | Depending on configuration |
| QuickConnect, myQNAPcloud Link, UGREENlink | None | Vendor servers | Browser or vendor app | No, NAS services only |
| Reverse proxy | 443, and 80 for certificates | None | Browser | No, published apps only |
Depending on your situation:
- Accessing your files and the NAS interface from a phone or laptop: Tailscale on the NAS, without touching your router. That is what the step-by-step below covers.
- No third-party dependency, with a public IP and an OPNsense or OpenWrt router: WireGuard on the router.
- Tailscale’s ease of use with your own coordination, if you already have a VPS: Headscale.
- No reachable public IP (ISP-level NAT): a WireGuard or OpenVPN server at home will stay unreachable; Tailscale, ZeroTier and vendor remote access work without port forwarding.
- Sharing an album with family members who will not install any client: a reverse proxy over HTTPS in front of that single application, with strong authentication.
Each alternative is detailed further down, after the tutorial. This guide relies on the official documentation of each project and each vendor; no throughput was measured.
How Tailscale connects your devices
Every device with Tailscale installed joins your “tailnet” and gets a stable address in the 100.64.0.0 range with mask 255.192.0.0 (of the form 100.x.y.z), plus a machine name with MagicDNS. Connections are encrypted point to point with WireGuard. Tailscale traverses NAT on its own: no port forwarding is needed, and you should definitely not create any. When two devices cannot reach each other directly, traffic goes through DERP relays: it stays end-to-end encrypted, since these relays cannot decrypt it, but the connection is generally slower.
Tailscale is available as an official app in Synology’s Package Center and QNAP’s App Center, as well as for TrueNAS SCALE and Unraid. UGREEN documents an installation with Docker Compose, noting that the image is maintained by a third party. The NAS can also act as a subnet router, making reachable the devices on your local network that cannot run the client, such as a printer. The client is largely open source; the coordination server, however, is closed source.
Prerequisites and hardware
- A Synology NAS running DSM 7 with administrator access, or a Linux machine (Debian, Ubuntu, Fedora…) acting as a NAS, with
sudo. - A Tailscale account. You create it by signing in with a supported identity provider (Google, Microsoft, GitHub, Apple, OpenID Connect or a passkey). Tailscale states that its free “Personal” plan covers most personal, non-commercial uses, including accessing a NAS. Its limits change over time: check them on Tailscale’s pricing page.
- The Tailscale client on at least one remote device (Windows, macOS, Linux, iOS, Android).
- The SMB service enabled on the NAS, with a user account that has rights on the shares.
- No domain name, dynamic DNS or port forwarding. If you have already forwarded ports 445, 139, 5000, 5001 or 22 to the NAS, delete those rules on your router.
Tailscale needs no special hardware. On the Synology side, the official package installs from the DSM 7 Package Center; it runs, for example, on the DS220+. That model is end-of-life. The DS224+, another 2-bay Synology unit running DSM, has according to Synology’s spec sheet an Intel Celeron J4125, 2 GB of RAM expandable to 6 GB and two 1GbE ports. The DS220+ has no M.2 slot, so no NVMe SSD is possible. To compare current 2-bay models, see our 2-bay NAS comparison.
On the Linux side, a Dell OptiPlex Micro-type mini PC running Debian or Ubuntu makes a discreet NAS. If your model has an M.2 NVMe slot (check its spec sheet), a 1 TB NVMe SSD can serve as its system drive and fast storage. The choice between the two approaches is discussed in NAS or mini PC for a home server.
Install and configure Tailscale step by step
Step 1: Install Tailscale on the NAS
On Synology (DSM 7): open Package Center, search for “Tailscale”, click Install, then Open. The package interface sends you to the login page. Sign in with your identity provider, and the NAS joins your tailnet. The Package Center version is only updated roughly once a quarter. You can also manually install the SPK file matching your model’s architecture (Package Center > Manual Install), downloaded from Tailscale’s package server.
On a Linux NAS (OptiPlex or other): use the official script, then connect the machine.
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
# open the printed URL to authenticate the machine
Check (Linux, or Synology over SSH): the command should print an address in 100.x.y.z.
tailscale ip -4
tailscale status
On Synology, if tailscale is not in the PATH, use the full path /var/packages/Tailscale/target/bin/tailscale. In every case, the NAS must also appear on the Machines page of the admin console (login.tailscale.com/admin/machines).
Step 2: Enable TUN mode on DSM 7 (Synology only)
On DSM 7, Synology’s sandbox prevents the package from creating its TUN interface. The NAS is still reachable, but other DSM packages cannot make outbound connections to the tailnet, and the DSM firewall does not filter that traffic. The official documentation (Tailscale 1.22.2 or later) provides a task that runs at boot:
- Control Panel > Task Scheduler > Create > Triggered Task > User-defined script.
- General tab: user
root, event Boot-up, task enabled. - Task Settings tab, script:
/var/packages/Tailscale/target/bin/tailscale configure-host; synosystemctl restart pkgctl-Tailscale.service
Reboot the NAS, or run the task once with Run. You must rerun this script after every Tailscale package update.
Check: over SSH on the NAS (Control Panel > Terminal & SNMP > Enable SSH service, to be used only on the LAN or through Tailscale), the tailscale0 interface must exist and carry the 100.x.y.z address:
ip addr show tailscale0
The package creates this interface. There is nothing to create or rename in DSM.
Step 3: Disable key expiry for the NAS
By default, a device’s key expires (180 days for new tailnets). You then have to re-authenticate, which is a problem when you are away from home. Disabling it is common for a server: Machines page, ”…” menu at the right of the NAS row, then Disable key expiry.
Check: on the Machines page, the NAS shows “Expiry disabled” under its name.
Step 4: Use MagicDNS instead of a domain or dynamic DNS
The NAS’s 100.x.y.z address is stable, and MagicDNS gives it a name. MagicDNS is enabled by default on tailnets created since October 2022. Otherwise: admin console, DNS page, Enable MagicDNS button. The NAS then answers to its short name (for example nas) and to its full name nas.<your-tailnet>.ts.net. To change that name: Machines page, ”…” menu, Edit machine name. Dynamic DNS is pointless here: it tracks your router’s public IP, which Tailscale does not use.
Check, from a remote device connected to the tailnet (on mobile data, for example, to get off your LAN):
tailscale ping nas
The reply shows whether the link is direct (via <ip>:<port>) or relayed through a DERP server. Both work, but a direct link is faster.
Step 5: Access SMB shares through the tailnet
SMB uses port 445/TCP (port 21 is FTP’s). On Synology, make sure Control Panel > File Services > SMB > Enable SMB service is ticked. Then, from the remote device:
- Windows: in File Explorer,
\\nas\share-name(or\\100.x.y.z\share-name). - macOS: Finder, Go > Connect to Server,
smb://nas. - Linux: see below.
Check: curl does not test SMB, which is not HTTP. Use an SMB client that lists the shares instead:
# Linux (smbclient package)
smbclient -L //nas -U your_user
On Windows, in PowerShell, Test-NetConnection -ComputerName nas -Port 445 should return TcpTestSucceeded : True.
On a Linux NAS running Samba, first check the service locally: systemctl status smbd (Debian/Ubuntu; the configuration lives in /etc/samba/smb.conf). If UFW is active, allow SMB only on the Tailscale interface:
sudo ufw allow in on tailscale0 to any port 445 proto tcp
sudo ufw status verbose
The DSM interface remains reachable at https://nas:5001 (or http://nas:5000), again through the tailnet only.
Step 6: Secure the account and restrict access
Two-factor authentication: Tailscale does not manage passwords. 2FA is enabled at the identity provider you use to sign in (Google, Microsoft, GitHub account…), and is not a paid Tailscale option. Turn it on there.
Access rules: the default policy allows all traffic between tailnet devices. To limit access to the NAS to SMB and DSM, edit the policy file in the admin console, on the Access controls page. Example with a tag. The tag is applied to the NAS from Machines > … > Edit ACL tags, once it is declared in tagOwners:
{
"tagOwners": {
"tag:nas": ["autogroup:admin"]
},
"grants": [
{
"src": ["autogroup:member"],
"dst": ["tag:nas"],
"ip": ["tcp:445", "tcp:5001"]
}
]
}
Warning: this file replaces the “allow everything” rule. Add any other flows you need (between your PCs, for example) before saving. The console validates the syntax when you save.
DSM firewall: if it is enabled (Control Panel > Security > Firewall), add an Allow rule to the profile in use for source 100.64.0.0, mask 255.192.0.0. Otherwise, Tailscale traffic will be blocked once TUN mode is on.
Check: from a member device, smbclient -L //nas -U your_user still works, while another port (for example nc -zv nas 22 on Linux) is refused or times out.
Step 7: Check status and keep Tailscale up to date
tailscale status
tailscale netcheck
status lists peers and their state. netcheck describes UDP connectivity and the nearest DERP relay. On Linux, daemon logs are read with journalctl -u tailscaled.
For updates on Synology, the documentation suggests a Scheduled Task > User-defined script run as root (daily, for example):
/var/packages/Tailscale/target/bin/tailscale update --yes
Then remember to rerun the configure-host script from step 2, or reboot the NAS. On Linux, Tailscale is updated with the package manager (sudo apt update && sudo apt upgrade).
Check: tailscale version prints the installed version.
Final checks
tailscale statuson the NAS: the remote device is listed.tailscale ping nasfrom outside: you get a reply.smbclient -L //nas -U user, orTest-NetConnection -Port 445: the shares are listed, or the port responds.- From an outside network without Tailscale running, your router’s public IP must not respond on 445 or 5001. Also check on the router that no port forwarding points to the NAS.
What you should never expose to the Internet
With a private VPN, no NAS service needs to be reachable from the Internet. These rules apply whichever solution you pick:
- SMB (TCP port 445): Microsoft recommends blocking this port for inbound traffic from the Internet. Mount your shares through the VPN. Same rule for AFP and NFS.
- The admin interface (DSM on 5000 and 5001, QTS on 8080 and 443 by default): in 2022, the DeadBolt ransomware targeted NAS devices exposed to the Internet, and QNAP asked users to remove the forwarding of these ports. Do not forward it “just to test” either.
- SSH and Docker: only through the VPN.
- UPnP and NAT-PMP: turn them off, otherwise the NAS or an app can open ports without your knowledge. QNAP recommended unticking UPnP port forwarding in myQNAPcloud, and UGREEN advises against unnecessary automatic port mapping. Also turn off QuickConnect if you no longer need it.
- Funnel: with Tailscale, Serve shares a service with your own devices only, while Funnel publishes it on the Internet for anyone. For a NAS, it is Serve or nothing.
Other useful settings:
- Enable 2FA at your identity provider, and on the DSM administrator account too.
- Restrict flows with grants and give the NAS a dedicated tag, rather than opening the whole local network to every device.
- HTTPS for DSM: Tailscale can issue a certificate for the
*.ts.netname (admin console, DNS page, Enable HTTPS, thentailscale certon the machine). The names of certified machines are then published in public Certificate Transparency logs: avoid revealing names. On Synology, the certificate has to be imported into DSM by hand; check the procedure for your version. - Tailscale is not a backup: apply a 3-2-1 strategy, for example with our Restic tutorial for a 3-2-1 NAS backup.
Troubleshooting common errors
The NAS shows as offline in the console
Cause: expired key, or the package stopped after a DSM update. Fix: over SSH, run sudo tailscale up and open the printed URL. Then disable key expiry (step 3).
Other DSM packages cannot reach the tailnet
Cause: TUN mode is inactive, which often happens after a package update. Fix: rerun the configure-host task (step 2) and check with ip addr show tailscale0.
The NAS stops responding after enabling TUN mode
Cause: the DSM firewall blocks the 100.64.0.0 range (mask 255.192.0.0). Fix: add the allow rule described in step 6.
nas does not resolve
Cause: MagicDNS is disabled, or the client does not accept Tailscale DNS. Fix: enable MagicDNS (DNS page) and test with the full name nas.<tailnet>.ts.net or the 100.x.y.z IP.
Slow connection
Cause: link relayed via DERP, which happens with strict NAT or filtered UDP. Fix: run tailscale netcheck and tailscale ping nas. Do not open service ports: see Tailscale’s documentation on direct connectivity.
SMB/DSM ports are refused
Cause: overly restrictive grants, or the SMB service is disabled. Fix: review the policy file and check File Services > SMB.
Tailscale alternatives in detail
Self-hosted WireGuard: on the router, the NAS or a small machine
WireGuard sets up a connection by exchanging public keys, much like SSH keys, using recent cryptographic primitives (Noise, Curve25519, ChaCha20, Poly1305, BLAKE2). It is built into the Linux kernel and has clients for Windows, macOS, Linux, iOS and Android. An advantage for a service reachable from the Internet: the server does not respond at all to packets from an unauthorized client.
- On the router: OPNsense includes WireGuard, which is also available for OpenWrt; some consumer routers have a built-in VPN server, check their documentation. See our guide to installing OPNsense on a mini PC.
- On the NAS: QNAP offers a WireGuard server in QVPN Service 3 (port 51820 by default). Synology’s VPN Server package handles PPTP, OpenVPN and L2TP/IPSec, but not WireGuard: on a Synology, the native options are OpenVPN (UDP port 1194 by default) and Tailscale.
- On a small Linux machine that is already always on: a Raspberry Pi, a mini PC or a virtual machine.
In return: a UDP port to forward, a public IP address (with dynamic DNS if it changes) and each device’s keys to manage yourself. To compare the protocols: WireGuard vs OpenVPN vs Tailscale.
Headscale: Tailscale without its coordination server
Headscale is an open source, self-hosted implementation of the Tailscale control server, designed for personal use or a small organization: a single tailnet, with the official Tailscale clients. MagicDNS, subnet routers, exit nodes and access rules are supported. The downside: it must run on a server with a public IP address, over HTTPS on port 443, for example a VPS. That server is what gets exposed, not your NAS, but it is one more service to maintain and secure. The project is developed independently of Tailscale, which does however employ one of its maintainers.
ZeroTier: a virtual Ethernet network
ZeroTier emulates an Ethernet network on top of an end-to-end encrypted peer-to-peer network. When a direct connection fails, it relays traffic for free, but more slowly. Root servers operated by ZeroTier help devices find each other (you can add your own), and the network controller can be hosted by ZeroTier or by you. A free plan exists for personal, non-commercial use. Be careful: ZeroTier’s documentation lists Synology and QNAP as deprecated platforms that it no longer actively supports. It is better installed on another machine on the network or on the router (OPNsense offers it as a plugin).
QuickConnect, myQNAPcloud Link, UGREENlink: vendor remote access
- QuickConnect (Synology) gives access to the NAS through a custom ID, without port forwarding, with a Synology relay when a direct connection is not possible, which can be slow. The address QuickConnect.to/your-id leads to the DSM login screen.
- myQNAPcloud Link (QNAP) gives access to the NAS through a unique address, including via a QNAP relay. QNAP put it forward as an alternative to port forwarding during the DeadBolt wave in 2022.
- UGREENlink (UGREEN) goes through UGREEN’s cloud servers, with no public IP or port forwarding, and an automatic Let’s Encrypt certificate; throughput then depends on the relays’ bandwidth. The address ug.link/your-id opens the UGOS Pro login page.
Handy for the NAS of a relative who is not technical, these services depend on the vendor’s account and infrastructure, and make the NAS login page reachable by anyone who knows the ID. If you enable them: a strong password, two-factor authentication, automatic IP blocking after repeated failures, the default “admin” account disabled and an up-to-date system, as the vendors recommend.
Reverse proxy: publish an app, not the NAS
To share photos with people who will not install any VPN client, a reverse proxy publishes one specific application (Immich, Nextcloud…) under a domain name over HTTPS. Caddy automatically obtains and renews its Let’s Encrypt or ZeroSSL certificates, if the domain points to your IP and ports 80 and 443 are reachable; DSM also includes a reverse proxy. Put strong authentication in front of the application, its own or an SSO portal such as Authentik (Authentik behind Traefik tutorial). Every published application remains an attack surface: reserve this method for services designed to be exposed, keep them up to date, and never route NAS administration through it. Setup: automatic HTTPS reverse proxy with Caddy and Docker.
FAQ
Can I use Proton VPN or NordVPN to access my NAS?
No. These services encrypt the connection between your device and their servers, then send you out to the Internet, with no tunnel to your home network: they protect your browsing, for example on public Wi-Fi, but they do not lead to your NAS.
Do I need to open a port on my router?
With Tailscale, no: it traverses NAT on its own (see “How Tailscale connects your devices”). Only a WireGuard or OpenVPN server hosted at home requires port forwarding.
Can the Tailscale relay read my files?
No: through a DERP relay, data stays end-to-end encrypted with WireGuard; only speed may suffer.
Is Tailscale free for accessing a NAS?
According to Tailscale, its “Personal” plan covers most personal uses, including accessing a NAS; its limits are covered in the prerequisites.
Can my Synology be a WireGuard server?
Not with the VPN Server package, which does not support WireGuard: the options are detailed in the “Self-hosted WireGuard” section.
Does Tailscale SSH work on Synology?
No, the documentation states it is not supported: use DSM’s built-in SSH server, reached through the tailnet.
My ISP puts me behind a shared NAT (CGNAT). What can I do?
If the WAN IP address shown by your router differs from the one websites see, you are behind your ISP’s NAT. In that case, prefer Tailscale, ZeroTier or vendor remote access, which work without port forwarding, or ask your ISP for a public IP.
Key facts
Our picks
Affiliate links · same price for youSynology DiskStation DS220+
Amazon · price and availability on the listing
Dell OptiPlex Micro Desktop
Amazon · price and availability on the listing
Corsair 1 TB NVMe SSD
Amazon · price and availability on the listing
See all our recommended gear in the shop.