Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroTier内网穿透(主要用于所内nfs内网) #44

Open
cndaqiang opened this issue Dec 19, 2020 · 8 comments
Open

ZeroTier内网穿透(主要用于所内nfs内网) #44

cndaqiang opened this issue Dec 19, 2020 · 8 comments

Comments

@cndaqiang
Copy link
Owner

cndaqiang commented Dec 19, 2020

连不上服务器可能是系统时间不对

不能在网页端删除设备

不然网页端再也刷新不出来了

配置是实时的

不用点击保存

客户端可以加入多个网络

其他客户端重启,mac连不上

重启mac客户端

@cndaqiang
Copy link
Owner Author

https://www.zerotier.com/

笔记本, arm节点,mac,nfs共享计算节点,这样就不用担心了mac断网的问题了

@cndaqiang
Copy link
Owner Author

cndaqiang commented Dec 19, 2020

Linux-Mint/Armbian

安装

sudo apt install curl
curl -s https://install.zerotier.com | sudo bash

结果

ureadahead will be reprofiled on next reboot
Setting up zerotier-one (1.6.2-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/zerotier-one.service → /lib/systemd/system/zerotier-one.service.
Processing triggers for systemd (237-3ubuntu10) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for ureadahead (0.100.0-20) ...

*** Enabling and starting zerotier-one service...
Synchronizing state of zerotier-one.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable zerotier-one

*** Waiting for identity generation...

*** Success! You are ZeroTier address [ 1b02ee7f9c ].

(python37) cndaqiang@mommint:~$

必须zerotier-one的服务启动,才能加入网络

root@mommint:/home/cndaqiang# systemctl start zerotier-one
root@mommint:/home/cndaqiang# zerotier-cli join ID
200 join OK

开机启动

vi /etc/rc.local

systemctl start zerotier-one
zerotier-cli join ID

更新

sudo apt remove zerotier-one
curl -s https://install.zerotier.com | sudo bash

或者

apt install zerotier-one

@cndaqiang
Copy link
Owner Author

cndaqiang commented Dec 19, 2020

网速测试

mac - Mint

Mint具有网络环境:路由器192.168.1.*,所内ip:10.127.A.B
zerotier局域网:192.168.192.*

mac在路由器下面时

(python37) cndaqiang@mac Desktop$ scp da tazip 192.168.1.130:
data.zip    100%   14MB   3.2MB/s   00:04
(python37) cndaqiang@mac Desktop$ scp data.zip 10.127.A.B:
data.zip    100%   14MB   3.2MB/s   00:04
(python37) cndaqiang@mac Desktop$ scp data.zip 192.168.192.204:
data.zip

mac连接所内无线网时

(python37) cndaqiang@mac Desktop$ scp data.zip 10.127.A.B:
data.zip    100%   14MB  13.3MB/s   00:01
(python37) cndaqiang@mac Desktop$ scp data.zip 192.168.192.204:
data.zip    100%   14MB   5.5MB/s   00:02

mac连接电信/移动/联通4G

无法ping通所内机器了,也许是所或者运营部商的原因
但是手机用4g时是可以访问的所内机器的

最终结论所内使用还是非常不错的,不用担心nfs服务被别人给挂载了

@cndaqiang cndaqiang changed the title ZeroTier内网穿透 ZeroTier内网穿透(主要用于所内nfs内网) Dec 20, 2020
@cndaqiang
Copy link
Owner Author

群晖

ssh后

cndaqiang@SF10-NAS:~$ uname -a
Linux SF10-NAS 4.4.59+ #25426 SMP PREEMPT Mon Dec 14 18:48:50 CST 2020 x86_64 GNU/Linux synology_apollolake_418play

确定版本是apollolake
从zerotier下面apollolake的版本安装

@cndaqiang
Copy link
Owner Author

cndaqiang commented May 9, 2021

openwrt

ar71xxx
https://github.com/mwarning/zerotier-openwrt/releases/tag/v1.1.4_2

wget https://github.com/mwarning/zerotier-openwrt/releases/download/v1.1.4_2/zerotier_1.1.4-2_ar71xx.ipk
root@OpenWrt:~# opkg install zerotier_1.1.4-2_ar71xx.ipk
Installing zerotier (1.1.4-2) to root...
Configuring zerotier.
Generate secret - please wait...

root@OpenWrt:~#

填入ID

vi /etc/config/zerotier

示例,加入两个内网

config zerotier 'sample_config'
        option enabled '1'
        option interface 'wan'
        list join 'XXXXXXXXXXXX'
        option secret 'generate' #generate下次启动生成新的

config zerotier 'suanpan'
        option enabled '1'
        option interface 'wan'
        list join 'XXXXXXXXXXXXXX'
        option secret 'generate'

启动(也可在luci中控制)

 /etc/init.d/zerotier restart

@cndaqiang
Copy link
Owner Author

windows开机自动更新时间
image

@cndaqiang
Copy link
Owner Author

@cndaqiang
Copy link
Owner Author

mac zerotier突然闪退,打开后无法连接局域网设备

关闭zerotier
关闭网卡

sudo ifconfig feth2483  down

打开zerotier,断开,重连

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant