请问 tailscale 新自建中继 DERP 如何建立部署,是否可以共享给其他人使用

2021-07-26 17:28:51 +08:00
 info521
https://tailscale.com/kb/1118/custom-derp-servers/ 官方教程 再第二部建立不会。

https://github.com/tailscale/tailscale/issues/1264 全部沟通过程

https://github.com/tailscale/tailscale/blob/main/tailcfg/derpmap.go 具体代码
7639 次点击
所在节点    宽带症候群
55 条回复
mangohaoming
2021-09-19 19:22:12 +08:00
@Sekai 没有提示错误,设备面板也显示链接上了,就是 p2p 无法打洞的情况下两个客户端就 ping 不通了
mangohaoming
2021-09-19 19:44:19 +08:00
@Sekai 就只有采用默认的 443 端口才一切正常
Sekai
2021-09-21 22:21:08 +08:00
@mangohaoming 要不把命令改成 derper -c=$HOME/derper.conf -a 0.0.0.0:998 --stun 试试?否则还是防火墙的问题吧,如果用 443 打洞正常的情况下,另外还可以换高位端口。
mangohaoming
2021-09-22 08:59:43 +08:00
@Sekai 测试了也还是不行,相关端口系统防火墙和外围安全组都确认 tcp/udp 都放开了,终端运行命令只有启动提示,443 端口是有客户端接入提示的。
Sekai
2021-09-22 14:08:57 +08:00
@mangohaoming 那我真没辙了,实在想用只能换系统试试,debian10 centos7 我这都可以,能加多台。
mangohaoming
2021-09-22 16:13:45 +08:00
@Sekai 你的 vps 是哪家的,我的是腾讯云。我换一下系统镜像试试
Sekai
2021-09-23 11:29:56 +08:00
@mangohaoming 毛子 gc,清凉云应该 dd 之后再用啊
oddcc
2021-09-23 14:51:09 +08:00
请教一下,部署成功之后,是怎么指定流量走自建的 DERP 的?
需要把官方的全部禁用吗?
mangohaoming
2021-09-23 16:25:03 +08:00
@oddcc 设置这个参数就行,"OmitDefaultRegions": true,作为 derpMap 的子节点
mangohaoming
2021-09-23 16:28:37 +08:00
@Sekai 意思是腾讯云要换自己上传的镜像去安装后再使用?
oddcc
2021-10-28 17:43:59 +08:00
确实是这样, 测下来用 443 才能转发成功
否则只是能在 admin 中看到连上了这个 node, 实际还是 ping 不通
zyqv2
2021-11-17 09:41:29 +08:00
可以试试这个 docker 镜像 zouyq/derper,亲测是 ok 的,主要网络最好使用桥接模式,非 443 端口需要配置服务端证书,并在 tailscale 管理控制台那里添加 DERPPort:xxx 指定端口
cweijan
2021-11-21 02:10:34 +08:00
@oddcc, 我配置成功了, 自定义端口不是在 HostName 后面加, 而是需要增加 DERPPort, 例子
```json
{
"DERPMap": {
"OmitDefaultRegions": false,
"Regions": {
"900": {
"RegionID": 900,
"RegionCode": "1",
"Nodes": [
{
"HostName": "xxxx",
"DERPPort": 998,
"Name": "1",
"RegionID": 900
}
]
}
}
}
}
```
info521
2021-11-25 23:32:46 +08:00
转载:

https://mangoroom.cn/tools/tailscale-custom-derper-servers.html

节点为腾讯云广州节点,带宽有限,请勿滥用,如果想支持本节点可双击下方点赞或者请芒果喝一杯奶茶

// Example/default ACLs for unrestricted connections.
{
// Declare static groups of users beyond those in the identity service.
"Groups": {
"group:example": [ "user1@example.com", "user2@example.com" ],
},
// Declare convenient hostname aliases to use in place of IP addresses.
"Hosts": {
"example-host-1": "100.100.100.100",
},
"ACLs": [
// Match absolutely everything. Comment out this section if you want
// to define specific ACL restrictions.
{ "Action": "accept", "Users": ["*"], "Ports": ["*:*"] },
],
"derpMap": {
"Regions": { "900": {
"RegionID": 900,
"RegionCode": "mangoderp",
"Nodes": [{
"Name": "1",
"RegionID": 900,
//本节点由 mangoroom.cn 提供,请勿滥用。详情访问 https://mangoroom.cn/tools/tailscale-custom-derper-servers.html
"HostName":"tailscalederper.mangoroom.cn",
}]
}}
}
}
info521
2021-11-25 23:33:32 +08:00
info521
2021-11-25 23:37:21 +08:00
1.16 版本开始,可以自定义 DERP 端口

当前版本是 1.16 。现在有用户使用自定义 DERP 端口

https://github.com/tailscale/tailscale/issues/1264


搜索关键词

DERP
This is a Tailscale DERP server.

可找到公开的 DERP 中继服务器;
info521
2021-11-26 00:17:41 +08:00
转载:

https://blog.laisky.com/p/tailscale/ 四、安装、部署

关于备案信息,tls,letsencrypt 解释
info521
2021-11-26 14:06:58 +08:00
info521
2021-11-26 14:31:56 +08:00
如何启用 DERP 客户端限制
https://github.com/tailscale/tailscale/issues/3024

derper --help
-verify-clients
verify clients to this DERP server through a local tailscaled instance.
xxb
2021-12-01 02:26:42 +08:00
我用 docker 自建的 derp ,貌似证书没有自动搞定

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/791876

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX