You have one home with all the servers, and four access scenarios with different constraints. Here's how to think about it — principles, not configs.
The Scenarios
- Home (main): This is where everything lives — NAS, hypervisor, Docker containers, the whole stack
- Second home (family): Different city, different router, family members who just want things to work
- Office: Behind a corporate firewall with deep packet inspection that detects and blocks VPN traffic
- On the road: Hotel WiFi, mobile data, airport lounges — unpredictable networks
The Tech Stack
Tailscale — The Backbone
Bash
tailscale up --accept-routes --accept-dns
- Subnet routing: Run a Tailscale node as a gateway, and your entire home LAN becomes accessible to every device on the mesh. I run mine on a lightweight LXC container in Proxmox — always on, minimal resources.
- --accept-dns: Tailscale pushes DNS config to connected devices. MagicDNS gives every node a hostname on your tailnet.
- NAT traversal: Works through most firewalls and NATs via UDP hole punching. Falls back to relay servers (DERP) when direct connection isn't possible.
- Zero config on the home side: No port forwarding, no dynamic DNS, no firewall rules. The subnet router advertises your LAN, and every Tailscale device can reach it.
ZeroTier — The mDNS Bridge
- AirPlay to my living room speakers and Apple TV
- AirPrint to the home printer
- SMB file shares that rely on Bonjour/mDNS discovery
Cloudflare Tunnel — Zero-Trust Backup
- Admin interfaces I want to access from any browser without VPN (Unraid panel, NPM admin)
- Content browsing where the 100MB upload limit and occasional latency don't matter
- Backup access path when Tailscale is down or I'm on a device without it installed
- Large file transfers — Cloudflare's free tier has a 100MB request body limit. Cloud storage / NAS file sharing won't work.
- Latency-sensitive apps — traffic routes through Cloudflare's nearest PoP, which adds a hop.
- Some apps that expect direct connections — password managers like Bitwarden can throw sync errors through the tunnel.
Nginx Proxy Manager — The Public Gateway
| NPM | CF Tunnel | |
|---|---|---|
| Large files | ✅ No size limit | ❌ 100MB limit |
| Bitwarden | ✅ Works reliably | ❌ Sync errors |
| Zero-trust (no ports) | ❌ Needs port forward | ✅ Outbound only |
| Custom SSL | ✅ Full control | ✅ Automatic |
Unraid — The Docker Host
Proxmox VE — The Hypervisor
Principle 1: Minimize Public Exposure
| Tier | Examples | Access |
|---|---|---|
| Public | Photo gallery, file sharing, password vault | Anyone with URL + auth |
| VPN-only | Dashboards, monitoring, container management | Tailscale/ZeroTier required |
| LAN-only | Router admin, hypervisor console, NAS management | Physical/subnet only |
Principle 2: One Door, Many Rooms
- photos.example.com:XXXX → photo gallery
- files.example.com:XXXX → file manager
- vault.example.com:XXXX → password vault
Principle 3: Trust Layers
Principle 4: Carry Your LAN With You
- Ask IT to whitelist it. Seriously. If your company allows personal devices and you have a reasonable relationship with IT, this is the least effort path. The firewall logs will show the connection attempt — it's better to get it approved than to fight the system.
- SOCKS5 through a whitelisted port. If option 1 isn't possible, you can tunnel Tailscale through a SOCKS5 proxy on a port the firewall allows.
Principle 5: Don't Make Family IT Support
What I Tried and Abandoned
HTTPS for internal services
- Local DNS override on the router (domain → NAS internal IP)
- Real Let's Encrypt cert via DNS challenge (no port 80 needed)
- NPM proxy with SSL — terminal curl confirmed it worked perfectly
- Opened the browser... connection error
Exposing everything publicly with access lists
The Architecture
The Takeaway
- Family at second home → Tailscale subnet router + direct IP bookmarks
- You at office → Tailscale (whitelisted) + CF Tunnel as backup
- You on the road → Tailscale for internal, NPM for public services
- You at home → Direct LAN, zero overhead
你有一个放满服务器的家,和四个不同限制的访问场景。这篇讲的是原则,不是配置教程。
场景
- 主家:所有基础设施都在这——NAS、虚拟化、Docker 容器,全套
- 第二个家(家人):不同城市,不同路由器,家人只想东西能用
- 办公室:企业防火墙做深度包检测,能识别并封锁 VPN 流量
- 在路上:酒店 WiFi、手机热点、机场休息室——不可预测的网络环境
技术栈
Tailscale — 骨干
Bash
tailscale up --accept-routes --accept-dns
- 子网路由(Subnet Routing):跑一个 Tailscale 节点当网关,整个家庭局域网对 mesh 上所有设备可见。我的跑在 PVE 的一个轻量 LXC 容器里——常驻运行,资源占用极低。
- --accept-dns:Tailscale 推送 DNS 配置到连接设备。MagicDNS 给每个节点一个 tailnet 域名。
- NAT 穿透:通过 UDP 打洞穿越大多数防火墙和 NAT。打不通就走 DERP 中继服务器。
- 家里零配置:不用端口转发,不用 DDNS,不用改防火墙规则。子网路由器广播你的 LAN,所有 Tailscale 设备都能访问。
ZeroTier — mDNS 桥接
- AirPlay 到客厅音箱和 Apple TV
- AirPrint 到家里的打印机
- 依赖 Bonjour/mDNS 发现的 SMB 文件共享
Cloudflare Tunnel — 零信任备份
- 管理界面——不装 VPN 也能从任意浏览器访问(NAS 面板、NPM 后台)
- 内容浏览——100MB 上传限制和偶尔的延迟无所谓的场景
- 备用通道——Tailscale 挂了或者设备上没装的时候
- 大文件传输——免费版有 100MB 请求体限制。网盘/NAS 文件共享用不了。
- 延迟敏感的应用——流量绕 Cloudflare 最近的 PoP,多一跳。
- 某些需要直连的应用——比如 Bitwarden 密码管理器通过隧道会报同步错误。
Nginx Proxy Manager — 公网网关
| NPM | CF Tunnel | |
|---|---|---|
| 大文件 | ✅ 无限制 | ❌ 100MB 限制 |
| Bitwarden | ✅ 稳定 | ❌ 同步报错 |
| 零信任(不开端口) | ❌ 需要端口转发 | ✅ 仅出站 |
| 自定义 SSL | ✅ 完全控制 | ✅ 自动 |
Unraid — Docker 宿主
Proxmox VE — 虚拟化平台
原则一:最小暴露
| 层级 | 例子 | 访问方式 |
|---|---|---|
| 公开 | 相册、文件共享、密码库 | URL + 认证 |
| 仅 VPN | Dashboard、监控、容器管理 | Tailscale/ZeroTier |
| 仅局域网 | 路由器后台、虚拟化控制台、NAS 管理 | 物理/子网访问 |
原则二:一个入口,多个房间
- photos.example.com:XXXX → 相册
- files.example.com:XXXX → 文件管理
- vault.example.com:XXXX → 密码库
原则三:分层信任
原则四:随身局域网
- 找 IT 开白名单。 说真的。如果公司允许个人设备,而且你跟 IT 关系还行,这是最省力的路。防火墙日志会记录连接尝试——与其偷偷摸摸,不如光明正大报备。
- SOCKS5 中转。 如果方案一走不通,可以通过一个防火墙放行的端口跑 SOCKS5 代理来隧道化 Tailscale 流量。
原则五:别让家人找你修电脑
踩过的坑
给内部服务配 HTTPS
- 路由器上配本地 DNS 覆盖(域名 → NAS 内网 IP)
- 用 DNS Challenge 签了真正的 Let's Encrypt 证书(不需要开 80 端口)
- NPM 反向代理加 SSL——终端 curl 完美通过
- 打开浏览器……连接错误
Unraid 自签证书导致 Chrome 不缓存
所有服务都暴露公网 + Access List
架构
总结
- 家人在第二个家 → Tailscale 子网路由 + 直连 IP 书签
- 你在办公室 → Tailscale(白名单)+ CF Tunnel 备份
- 你在路上 → Tailscale 访问内部,NPM 访问公开服务
- 你在家里 → 直连局域网,零开销