![]() | 1 Sekai 2021-07-27 15:32:28 +08:00 搞好了,先在小鸡上配置好 go 环境。 然后安装 derper: go install tailscale.com/cmd/derper@main 然后修改自己网页上的 Access Controls,注意替换域名: https://www.codepile.net/pile/dNnwGoMA 最后执行 derper -c=$HOME/derper.conf -a xxx.xxx.xxx:998 --stun (我这里 443 占用了所以改成了 998 ) 重启各个机器上的 tailscale 服务,在网页的 Machine Details 里就能看到了,会显示 Relay #901 。应该还能用自己的证书,不过我还没时间看。 |
2 info521 OP $HOME 这个写死的吗,还是不同系统不通目录的? |
3 info521 OP 他这个可以共享给别人使用的,只要知道你的域名和端口 |
4 info521 OP $HOME 是缺省目录,是必须 root 目录吗? |
5 info521 OP derper -c=$HOME/derper.conf -a xxx.xxx.xxx:998 --stun 执行这一步时候,提示命令不存在, |
8 info521 OP derper: command not found go version sudo vim /etc/profile export GOROOT=/usr/lib/go-1.16 export GOPATH=/root/go export GOBIN=$GOPATH/bin export PATH=$PATH:$GOROOT/bin export PATH=$PATH:$GOPATH/bin 添加完成按 Esc 键,然后输入:wq 再按回车保存退出,然后执行以下命令,使配置生效。 source /etc/profile |
9 ylx 2021-08-26 10:12:15 +08:00 @Sekai 改成 998 后 Access Controls 里面的 hostname 是不是也需要加端口 按 998 配好后用你的示例没反应 |
10 mangohaoming 2021-08-28 16:28:34 +08:00 请问解决了吗 |
![]() | 11 Sekai 2021-08-29 21:19:34 +08:00 @ylx 我没加……它那个很奇怪,有的机器 Relays 里面会显示全部服务器也有自己配置的,有的就只有两个服务器甚至一个没有... |
13 mangohaoming 2021-08-30 10:29:09 +08:00 @Sekai 你好,小白请教两个问题:1. derper.conf 文件示例能否共享一下. 2. Access Controlss 设置改 hostname 与新增 derpermap 节点在 json 根节点这样可以吗? |
![]() | 14 Sekai 2021-08-30 22:47:40 +08:00 @mangohaoming derper.conf 自始至终就没动过,我都不知道在哪,看了一下里面是 PrivateKey 。第二个问题没看懂,可能我也是一知半解…… |
15 mangohaoming 2021-08-31 11:04:04 +08:00 @Sekai 配置 Access Controlss 只需要填 hostname 吗? |
16 mangohaoming 2021-08-31 13:12:16 +08:00 @Sekai 配置成功了,感谢 |
17 info521 OP @mangohaoming 能否把步骤分享下,我配置了,一直没成功; |
18 mangohaoming 2021-09-08 09:51:10 +08:00 @info521 步骤和 Sekai 说的一样,注意检查防火墙端口有没有开放,derper 进程有没有一直在运行(可以用进程守护工具守护) |
19 mangohaoming 2021-09-18 13:20:29 +08:00 @Sekai 你好,测试发现用其它端口不能正常使用 stun 转发,请问你的正常吗 |
![]() | 20 Sekai 2021-09-19 14:16:34 +08:00 @mangohaoming 有显示什么错误嘛? |
21 mangohaoming 2021-09-19 19:22:12 +08:00 @Sekai 没有提示错误,设备面板也显示链接上了,就是 p2p 无法打洞的情况下两个客户端就 ping 不通了 |
22 mangohaoming 2021-09-19 19:44:19 +08:00 @Sekai 就只有采用默认的 443 端口才一切正常 |
![]() | 23 Sekai 2021-09-21 22:21:08 +08:00 @mangohaoming 要不把命令改成 derper -c=$HOME/derper.conf -a 0.0.0.0:998 --stun 试试?否则还是防火墙的问题吧,如果用 443 打洞正常的情况下,另外还可以换高位端口。 |
24 mangohaoming 2021-09-22 08:59:43 +08:00 @Sekai 测试了也还是不行,相关端口系统防火墙和外围安全组都确认 tcp/udp 都放开了,终端运行命令只有启动提示,443 端口是有客户端接入提示的。 |
![]() | 25 Sekai 2021-09-22 14:08:57 +08:00 @mangohaoming 那我真没辙了,实在想用只能换系统试试,debian10 centos7 我这都可以,能加多台。 |
26 mangohaoming 2021-09-22 16:13:45 +08:00 @Sekai 你的 vps 是哪家的,我的是腾讯云。我换一下系统镜像试试 |
![]() | 27 Sekai 2021-09-23 11:29:56 +08:00 @mangohaoming 毛子 gc,清凉云应该 dd 之后再用啊 |
28 oddcc 2021-09-23 14:51:09 +08:00 请教一下,部署成功之后,是怎么指定流量走自建的 DERP 的? 需要把官方的全部禁用吗? |
29 mangohaoming 2021-09-23 16:25:03 +08:00 @oddcc 设置这个参数就行,"OmitDefaultRegions": true,作为 derpMap 的子节点 |
30 mangohaoming 2021-09-23 16:28:37 +08:00 @Sekai 意思是腾讯云要换自己上传的镜像去安装后再使用? |
31 oddcc 2021-10-28 17:43:59 +08:00 确实是这样, 测下来用 443 才能转发成功 否则只是能在 admin 中看到连上了这个 node, 实际还是 ping 不通 |
![]() | 32 zyqv2 2021-11-17 09:41:29 +08:00 可以试试这个 docker 镜像 zouyq/derper,亲测是 ok 的,主要网络最好使用桥接模式,非 443 端口需要配置服务端证书,并在 tailscale 管理控制台那里添加 DERPPort:xxx 指定端口 |
![]() | 33 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 } ] } } } } ``` |
34 info521 OP 转载: 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": [ "[email protected]", "[email protected]" ], }, // 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", }] }} } } |
35 info521 OP |
36 info521 OP 1.16 版本开始,可以自定义 DERP 端口 当前版本是 1.16 。现在有用户使用自定义 DERP 端口 https://github.com/tailscale/tailscale/issues/1264 搜索关键词 DERP This is a Tailscale DERP server. 可找到公开的 DERP 中继服务器; |
37 info521 OP |
39 info521 OP 如何启用 DERP 客户端限制 https://github.com/tailscale/tailscale/issues/3024 derper --help -verify-clients verify clients to this DERP server through a local tailscaled instance. |
40 xxb 2021-12-01 02:26:42 +08:00 我用 docker 自建的 derp ,貌似证书没有自动搞定 |
41 info521 OP 是国内吗?国内的域名备案, |
42 info521 OP 服务端开源版本 协调服务器的开源、自托管实现 控制服务器用作 Tailscale 网络中节点的 Wireguard 公钥交换点。它还分配客户端的 IP 地址,在每个用户之间创建边界,在用户之间启用共享机器,并公开您节点的通告路由。 headscale https://github.com/juanfont/headscale 完全自己部署独立整套系统 |
43 info521 OP |
44 info521 OP 腾讯云容器自建 DERP: 1 、域名备案, 2 、域名解析 3 、域名 SSL 申请 1 年免费,crt key 文件下载 4 、规划访问端口,例如 8082tcp ,3478udp stun ,防火墙放行; 5 、docker 安装,命令执行 docker run -it -d --name derper -p 8082:8082 访问端口映射 -p 3478:3478/udp -v /自定义证书目录 derpssl:/cert zouyq/derper /derper -hostname hostname -stun -a :8082 自定义端口 -certmode manual -certdir /cert 6 、安装检查 curl https://hostname.com:8082 https://hostname.com:8082 7 、tailscale 控制端设置 derp |
45 info521 OP 转:tailscale 自建 derper 服务器中转,使用自定义端口 https://blog.csdn.net/opopop880/article/details/122125430 |
46 info521 OP 节点分享,直接复制进去就可以,重启下客户端,目前 2 个国内节点 https://www.yuque.com/docs/share/4ce6a5f6-bf8d-4233-9501-59ae8dfbe65e?# 《 Tailscale DERP 》 |
47 yangchuansheng33 2022-01-08 18:00:52 +08:00 @Sekai 我这边测试虽然 derper 生效了,但是 ping 不通 peer ,非 443 端口。能不能告知一下的你的详细配置步骤啊 |
48 info521 OP |
49 info521 OP taiscale 客户端 容器 docker 安装 https://github.com/tailscale/tailscale/issues/504 容器安装讨论 https://github.com/tailscale/tailscale/blob/main/Dockerfile 镜像构建文件 https://hub.docker.com/r/tailscale/tailscale 镜像直接下载 # This Dockerfile includes all the tailscale binaries. # # To build the Dockerfile: # # $ docker build -t tailscale/tailscale . # # To run the tailscaled agent: # # $ docker run -d --name=tailscaled -v /var/lib:/var/lib -v /dev/net/tun:/dev/net/tun --network=host --privileged tailscale/tailscale tailscaled # # To then log in: # # $ docker exec tailscaled tailscale up # # To see status: # # $ docker exec tailscaled tailscale status |
50 latteczy 2022-03-16 15:23:08 +08:00 可以不用 HTTPS 吗? |
52 info521 OP 要的,你在试试,他们计划使用自签名,只是不依赖别家 ssl |
53 info521 OP |
![]() | 54 Sekai 2022-04-17 16:36:53 +08:00 derper -c=/root/derper.conf -hostname=你的域名 -http-port 81 -certmode=manual -certdir=/etc/nginx/ssl -stun 记录一下 |
55 preach 2022-04-20 17:30:29 +08:00 已搭建成功,docker |