Zero Open Ports: Remote NAS Access Without Exposing Your Router
Why port-forwarding NAS login pages attracts ransomware, and how Tailscale or Cloudflare Tunnel keeps every port bound to 127.0.0.1.
1. Why port forwarding is the #1 beginner trap
Automated scanners sweep the entire IPv4 space every few minutes looking for pre-built NAS login pages (e.g., Synology DSM, QNAP QTS, UGREEN UGOS, etc.) and self-hosted dashboards. One unpatched CVE on a forwarded port is enough to encrypt your entire array.
Disable UPnP and DMZ on your router first. Your NAS should never listen directly on your public IP.
2. Bind Docker ports to 127.0.0.1
In Docker Compose, writing ports: ["8081:80"] implicitly binds to 0.0.0.0 and bypasses common UFW firewall rules. Always prefix with 127.0.0.1: so services are only reachable locally or through your tunnel.
services:
vaultwarden:
image: vaultwarden/server:1.33.2-alpine
ports:
- "127.0.0.1:8081:80" # Never 0.0.0.0
3. Tailscale vs Cloudflare Tunnel
Choose Tailscale for personal and family access (phones, laptops) — traffic is end-to-end encrypted WireGuard and works great for Jellyfin video streaming. Choose Cloudflare Tunnel when you need a public HTTPS URL without installing a VPN client, but avoid streaming large video through it.
Comments (GitHub Discussions)
GitHub Discussions ↗Comments load lazily to keep pages fast everywhere.