xubiaolin / docker-zerotier-planet

一分钟私有部署zerotier-planet服务
2.52k stars 470 forks source link

已经搭建成功,客户端连不上 #32

Closed zwb0619 closed 1 year ago

zwb0619 commented 2 years ago

已经搭建成功了。在/opt目录下下载planet文件,在客户机上替换了,但是连不上。 我没用vps搭建,用的是ddns方式,在部署上,填写ip那个地方是用的域名代替。 tcp/9993,udp/9993都做了端口映射 PS C:\Users\down> zerotier-cli.bat join 826bb777c0f4c839 200 join OK PS C:\Users\down> zerotier-cli.bat peers 200 peers

826bb777c0 - PLANET -1 RELAY PS C:\Users\down> Detail for network authTokens:[ null ] authorizationEndpoint: capabilities:[] clientId: creationTime:1665151574943 dns:[] enableBroadcast:true id:826bb777c0f4c839 ipAssignmentPools:[ { "ipRangeEnd": "10.0.0.254", "ipRangeStart": "10.0.0.100" } ] mtu:2800 multicastLimit:32 name:O791@zlang nwid:826bb777c0f4c839 objtype:network private:true remoteTraceLevel:0 remoteTraceTarget: revision:4 routes:[ { "target": "10.0.0.0/24", "via": null } ] rules:[ { "not": false, "or": false, "type": "ACTION_ACCEPT" } ] rulesSource: ssoEnabled:false tags:[] v4AssignMode:{ "zt": true } v6AssignMode:{ "6plane": false, "rfc4193": false, "zt": false } 请教下能用ddns来用吗?
xubiaolin commented 2 years ago

826bb777c0 - PLANET -1 RELAY 看起来是已经成功了,走的是中继模式

如果你是ping不通的话,要在防火墙里面运行ICMP协议才行

zwb0619 commented 2 years ago

防火墙是关闭的。而且客户端没有得到分配的ip地址

zwb0619 commented 2 years ago

[root@localhost opt]# lsof -i tcp:9993 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME zerotier- 19214 root 6u IPv4 465468 0t0 TCP localhost:palace-2 (LISTEN) zerotier- 19214 root 7u IPv6 465469 0t0 TCP localhost:palace-2 (LISTEN) zerotier- 19214 root 9u IPv4 465478 0t0 TCP localhost.localdomain:palace-2 (LISTEN) zerotier- 19214 root 11u IPv4 465480 0t0 TCP localhost.localdomain:palace-2 (LISTEN) zerotier- 19214 root 21u IPv6 465490 0t0 TCP localhost.localdomain:palace-2 (LISTEN) zerotier- 19214 root 23u IPv6 465492 0t0 TCP localhost.localdomain:palace-2 (LISTEN) [root@localhost opt]# lsof -i udp:9993 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME zerotier- 19214 root 8u IPv4 465477 0t0 UDP localhost.localdomain:palace-2 zerotier- 19214 root 10u IPv4 465479 0t0 UDP localhost.localdomain:palace-2 zerotier- 19214 root 20u IPv6 465489 0t0 UDP localhost.localdomain:palace-2 zerotier- 19214 root 22u IPv6 465491 0t0 UDP localhost.localdomain:palace-2

zwb0619 commented 2 years ago

[root@localhost opt]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1) [root@localhost opt]#

xubiaolin commented 2 years ago

端口映射的是9993吗,在客户机执行一下telnet 域名 9993试试看

xubiaolin commented 2 years ago

没分配ip是不是你没有设置ip范围? image

zwb0619 commented 2 years ago

zwb@zwb-virtual-machine:/var/lib/zerotier-one$ sudo zerotier-cli join 826bb777c0f4c839 200 join OK zwb@zwb-virtual-machine:/var/lib/zerotier-one$ zerotier-cli peers zerotier-cli: authtoken.secret not found or readable in /var/lib/zerotier-one (try again as root) zwb@zwb-virtual-machine:/var/lib/zerotier-one$ sudo zerotier-cli peers 200 peers

62f865ae71 - PLANET -1 RELAY 778cde7190 - PLANET -1 RELAY cafe04eba9 - PLANET -1 RELAY cafe9efeb9 - PLANET -1 RELAY 用linux客户端试了下,结果是这个 Easy setup做了的,网络详情里面有ip范围 [ { "ipRangeEnd": "10.0.0.254", "ipRangeStart": "10.0.0.100" } ] telent是通的 zwb@zwb-virtual-machine:/var/log$ telnet zlang.580ya.net 9993 Trying 59.52.147.58... Connected to zlang.580ya.net. Escape character is '^]'.
xubiaolin commented 2 years ago

这看起来都没啥问题,你试试手动分配ip试试

zwb0619 commented 2 years ago

这看起来都没啥问题,你试试手动分配ip试试

在windows下,zt的虚拟网卡,设置固定ip,还是无法连上。ping不通planet的10.0.0.1,后台也看不到这个设备。

设置固定ip后,重启了zerotier-one服务,重新加入。

PS C:\Users\down> zerotier-cli.bat join 826bb777c0f4c839 200 join OK PS C:\Users\down> zerotier-cli.bat peers 200 peers

826bb777c0 - PLANET -1 RELAY PS C:\Users\down> ping 10.0.0.1 正在 Ping 10.0.0.1 具有 32 字节的数据: 请求超时。 10.0.0.1 的 Ping 统计信息: 数据包: 已发送 = 1,已接收 = 0,丢失 = 1 (100% 丢失), Control-C PS C:\Users\down>
xubiaolin commented 2 years ago

试试重新部署一下试试

zwb0619 commented 2 years ago

请问下3443是否影响连接?我刚刚发现我端口映射还有个3443。并且我是通过192.168.1.80:3443(而不是域名:3443)进入后台的,这样是否影响连接?

zwb0619 commented 2 years ago

解决上面3443的问题,换了台干净的重新部署,结果还是连不上。

zwb0619 commented 2 years ago

再来汇报下,不用域名,直接用我路由器拨号获得的外网ip重新建立,是可以连上的。只是用域名不行。

oldskooler commented 1 year ago

再来汇报下,不用域名,直接用我路由器拨号获得的外网ip重新建立,是可以连上的。只是用域名不行。

哎呀已经有人提问过了啊,我也是和你一样的状况,直接用ip地址可以,用域名不行