1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
root@hostname:/data/disk/temp# github_proxy="-c https.proxy=127.0.0.1:10808"
git clone ${github_proxy} https://github.com/xubiaolin/docker-zerotier-planet.git
Cloning into 'docker-zerotier-planet'...
remote: Enumerating objects: 930, done.
remote: Counting objects: 100% (412/412), done.
remote: Compressing objects: 100% (198/198), done.
remote: Total 930 (delta 263), reused 215 (delta 214), pack-reused 518 (from 2)
Receiving objects: 100% (930/930), 3.38 MiB | 2.28 MiB/s, done.
Resolving deltas: 100% (502/502), done.
root@hostname:/data/disk/temp# ls
docker-zerotier-planet
root@hostname:/data/disk/temp# cd docker-zerotier-planet/
root@hostname:/data/disk/temp/docker-zerotier-planet# ls
assets build.sh deploy.sh Dockerfile patch README.en.md README.md
root@hostname:/data/disk/temp/docker-zerotier-planet# ./deploy.sh
欢迎使用zerotier-planet脚本,请选择需要执行的操作:
1. 安装
2. 卸载
3. 更新
4. 查看信息
5. 重置密码
6. CentOS内核升级
7. 检查是否设置代理
0. 退出
请输入数字:1
daemon.json 文件存在.
代理配置未设置,将从第三方服务器拉取镜像【xubiaolin/zerotier-planet:latest】
开始安装,如果你已经安装了,将会删除旧的数据,10秒后开始安装...
Error response from daemon: No such container: myztplanet
请输入zerotier-planet要使用的端口号,例如9994: 4041
请输入zerotier-planet的API端口号,例如3443: 4042
请输入zerotier-planet的FILE端口号,例如3000: 4043
是否自动获取公网IP地址?(y/n) y
获取到的IPv4地址为: 192.x.x.x
获取到的IPv6地址为:
是否使用上面获取到的IP地址?(y/n) y
---------------------------
使用的端口号为:4041
API端口号为:4042
FILE端口号为:4043
IPv4地址为:192.x.x.x
IPv6地址为:
---------------------------
Unable to find image 'xubiaolin/zerotier-planet:latest' locally
latest: Pulling from xubiaolin/zerotier-planet
abc09f5e5870: Pull complete
7954a646ff36: Pull complete
99461bad7fd4: Pull complete
f7dab3ab2d6e: Pull complete
78d059024caa: Pull complete
6da485f00724: Pull complete
7ae8178859f8: Pull complete
08996ddb2f41: Pull complete
449750a6c3ad: Download complete
Digest: sha256:55611f7107fb48c33ecffa132a694b6c3f23cdb61f2317def309447d24d34fdb
Status: Downloaded newer image for xubiaolin/zerotier-planet:latest
a319b2ccdbfe64716c97b035a7cec937983f23e1f5123cba8112e127edbd3ee7
安装完成
---------------------------
请访问 http://192.x.x.x:4042 进行配置
默认用户名:admin
默认密码:password
请及时修改密码
---------------------------
moon配置和planet配置在 /data/disk/temp/docker-zerotier-planet/data/zerotier/dist 目录下
moons 文件下载: http://192.x.x.x:4043/0000001e30df539b.moon?key=d20ba5ca39e95b26
planet文件下载: http://192.x.x.x:4043/planet?key=d20ba5ca39e95b26
---------------------------
请放行以下端口:4041/tcp,4041/udp,4042/tcp,4043/tcp
---------------------------
root@hostname:/data/disk/temp/docker-zerotier-planet# sudo ufw status
Status: inactive
root@hostname:/data/disk/temp/docker-zerotier-planet# sudo ufw allow 4041/tcp
sudo ufw allow 4041/udp
sudo ufw allow 4042/tcp
sudo ufw allow 4043/tcp
Rules updated
Rules updated (v6)
Rules updated
Rules updated (v6)
Rules updated
Rules updated (v6)
Rules updated
Rules updated (v6)
root@hostname:/data/disk/temp/docker-zerotier-planet# sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
root@hostname:/data/disk/temp/docker-zerotier-planet# sudo ufw status numbered
Status: active
To Action From
-- ------ ----
[ 1] 8082 ALLOW IN Anywhere
[ 2] 8080 ALLOW IN Anywhere
[ 3] 4000 ALLOW IN Anywhere
[ 4] 4041/tcp ALLOW IN Anywhere
[ 5] 4041/udp ALLOW IN Anywhere
[ 6] 4042/tcp ALLOW IN Anywhere
[ 7] 4043/tcp ALLOW IN Anywhere
[ 8] 8082 (v6) ALLOW IN Anywhere (v6)
[ 9] 8080 (v6) ALLOW IN Anywhere (v6)
[10] 4000 (v6) ALLOW IN Anywhere (v6)
[11] 4041/tcp (v6) ALLOW IN Anywhere (v6)
[12] 4041/udp (v6) ALLOW IN Anywhere (v6)
[13] 4042/tcp (v6) ALLOW IN Anywhere (v6)
[14] 4043/tcp (v6) ALLOW IN Anywhere (v6)
root@hostname:/data/disk/temp/docker-zerotier-planet# sudo ufw allow 22/tcp
Rule added
Rule added (v6)
# 最关键的是要在管理实例的防火墙放开新添加的端口,并且ssh的默认端口22也要重新在linux中重新放开
|