nomadweb/frontend/content/book/chapters/05-network.md
eric ff7b721acb feat: NomadCNA community layer, social matching, payments, and ebook
Port meetups, discussions, gigs, dating/chat, VIP pay (ZPay/XorPay), MiroTalk live, digital academy, and ebook reader. Add persistent community_store, git-first deploy docs, and env template for production secrets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 09:38:13 -05:00

60 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 无论在哪,都能连回家
清迈咖啡馆的 WiFi 突然断了。
我切换到手机热点,打开终端,输入:
```bash
ssh nas
```
三秒后,我出现在家里那台 Proxmox 主机的 shell 里。文件在,服务在,就像从未离开过。
靠的是 **Tailscale**。
---
## 虚拟局域网
Tailscale 基于 WireGuard,把你在不同网络的设备,组成一个加密的虚拟局域网(Tailnet)。
家里跑 Tailscale 的 NAS,笔记本跑 Tailscale 客户端——无论 IP 怎么变,它们永远在「同一个局域网」里。
配置过程:
1. 在 Homelab 主机安装 Tailscale
2. 笔记本、手机同样安装并登录同一账号
3. 用 MagicDNS 给设备起名字,比如 `nas.tail-xxxxx.ts.net`
不需要公网 IP,不需要端口转发,不需要折腾路由器。
---
## 我常用的远程场景
**同步文件** — Nextcloud 客户端走 Tailscale 内网,速度比公网快,也不暴露服务到互联网。
**看代码** — Gitea 跑在内网,浏览器打开 `http://gitea:3000`,只有 Tailnet 里的设备能访问。
**紧急修复** — 生产环境告警,SSH 进去,改配置,重启服务。人在巴厘岛,手在家里。
---
## 安全习惯
- Homelab 服务**默认不暴露公网**
- 敏感操作走 SSH 密钥,禁用密码登录
- 定期备份到另一块硬盘,异地再备一份
网络自由的前提,是**安全意识**不能掉线。
---
## 连回家,意味着什么
游牧者容易有一种漂流感:今天这条街,明天那座城,没有锚。
Homelab 给我的锚,不是地理上的,是**数字上的**——我知道有一个地方,存着我的东西,跑着我的服务,随时等我回来。
这种确定感,和清迈的咖啡一样,是/nomad 生活的基础设施。