跳转至

Zerotier组网

zerotier linux 安装命令

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

windows mac组网 官网下载安装包

https://www.zerotier.com/download/

kali 安装Zerotier

安装报错:找不到 libss 某库

国内源无法按照,添加此源即可

vim /etc/apt/sources.list 
    deb http://security.debian.org/debian-security buster/updates main  
apt update
apt install libssl1.1 

zerotier linux基本命令操作

  1. 加入子网(id) #zerotier-cli join [id]
  2. 离开子网(id) #zerotier-cli leave [id]
  3. 查看本机状态信息 #zerotier-cli info

通过运行以下命令查看已连接的对等方:

zerotier-cli listpeers

200 listpeers <ztaddr> <path> <latency> <version> <role>
200 listpeers 12ac4a1e71 87.98.218.130/30883;12;12;1.00 589 1.2.5 LEAF
200 listpeers 8841408a2e 159.203.2.154/9993;13262;13220;1.00 127 1.1.5 PLANET
200 listpeers 9d219039f3 159.203.97.171/9993;13241;3218;1.00 63 1.1.5 PLANET

查看计算机连接的网络列表:

zerotier-cli listnetworks

windows 系统添加路由

route add [目的IPx.x.x.x] mask 255.255.255.0 [下一跳IP网关]

linux 后台执行程序

您希望在关闭当前终端时同时关闭后台运行的程序,可以使用以下方法:

  1. 使用 nohup 命令结合 disown 命令:
  2. 首先,在运行要在后台执行的命令之前加上 nohup。
  3. 接下来,可以通过 disown 命令将该命令与当前终端的关联解除。
    nohup command &
    
    这将使命令在后台运行,并且不会受到终端关闭的影响。输出将重定向到 nohup.out 文件中。
    disown -h pid
    
    • 可以使用 jobs 命令查看作业列表及其 ID。
    • 新建子进程,后台执行,可关闭当前窗口,进程不停止。
      bash -c "nohup xxx & "
      

python 在当前目录下启动HTTP服务器

python3 -m http.server 65237