什么是 NetBird
❝NetBird is a simple and fast alternative to corporate VPNs built on top of WireGuard® making it easy to create secure private networks for your organization or home. It requires near zero configuration effort leaving behind the hassle of opening ports, complex firewall rules, vpn gateways, and so forth. NetBird 是一个简单快速的企业级 VPN 替代方案,建立在原生 WireGuard® 之上,可以轻松为您的组织或家庭创建安全的私人网络。它几乎不需要任何配置工作,从而摆脱了开放端口、复杂的防火墙规则、VPN 网关等烦琐任务的困扰。
简要来说 NetBird 是一个配置简易的,基于 WireGuard 的 VPN。
它与 Tailscale 很像,但是区别也比较明显。Tailscale 是在用户态实现了 WireGuard 协议,无法使用 WireGuard 原生的命令行工具来进行管理。而 NetBird 直接使用了内核态的 WireGuard,可以使用命令行工具 wg 来查看和管理。
如果你是 WireGuard 原生党,墙裂建议使用 NetBird。
NetBird 服务端有 Management, Signal, Stun, Turn 四个后端组件外加一个前端。
80, 443, 33073, 10000
;3478, 49152-65535
;Auto0 官方推荐用 auth 0[2] 或 keyclock[3] 作为 NetBird 的第三方认证中心,为了节约服务器资源,此处使用 Auth0 (PS: 使用 Auth 0 可能需要开启魔法)。
允许跨域:
启用 Device Code 授权方式:
应用建好后,将 Domain, Client ID, Client Secret 保存下来即可:
git pull git@github.com:yimiaoxiehou/netbird-quickstart.git
cd netbird-quickstart
#记得把 Client ID, Domain, Your Domain 替换成对应的值
sed -i 's#example-clientid#Client ID#g' docker-compose.yaml
sed -i 's#https://example.auth0.com#Domain#g' management.json
sed -i 's#https://example.auth0.com#Domain#g' docker-compose.yaml
sed -i 's#netbird.example.com#Your Domain#g' management.json
sed -i 's#netbird.example.com#Your Domain#g' docker-compose.yaml
将准备好的 TLS 证书放到 ssl 文件夹中,证书 cert 文件重命名为 cert.pem
,key 文件重命名为 privkey.pem
。
启动
docker-compose up -d --build
然后记得使用宝塔面板等讲 8000 端口反向代理为 80 端口并配上 https(使用一开始的证书)。
打开搭建好的 NetBird 网站,新建一个 setup key 并将其复制下来。
按照 add new peer 的说明,安装好客户端:
然后执行
netbird up --management-url <https://netbird.example.com:33073> --setup-key xxx
成功后可以通过
netbird status --detail
查看客户端状态和连接上的其他子节点
另外 NetBird 可以通过 UI 界面管理你的网络,例如分组、制作路由规则、自定义 DNS 等等。
[1]
https://netbird.example.com: https://netbird.example.com/
[2]
auth 0: https://auth0.com/
[3]
keyclock: https://www.keycloak.org/
Sealos 社区长期征稿,欢迎 Sealos 终端用户与开发者前来投稿,奖金💰丰厚!详情可查看文章👇
加入 Sealos 开源社区
体验像个人电脑一样简单的云操作系统
🏠官网链接
https://sealos.io
🐙GitHub 地址
https://github.com/labring/sealos
📑访问 Sealos 文档
https://sealos.io/zh-Hans/docs/Intro
🏘️逛逛论坛
https://forum.laf.run/
将 Llama2 中文模型接入 FastGPT,再将 FastGPT 接入任意 GPT 套壳应用,真刺激!
一键部署 Umami 统计个人网站访问数据,跟 Google Analytics 说再见
3 分钟将免费无限制的 Claude 2.0 接入任意 GPT 套壳应用,太香了!
Sealos 是一款以 Kubernetes 为内核的云操作系统发行版。它以云原生的方式,抛弃了传统的云计算架构,转向以 Kubernetes 为云内核的新架构,使企业能够像使用个人电脑一样简单地使用云。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有