先正常安装
curl -s https://install.zerotier.com | sudo bash
然后加入网络
zerotier-cli join xxx
再在pve的/etc/network/interfaces添加
auto vmbr1
iface vmbr1 inet static
address 192.168.20.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up zerotier-cli leave xxx
post-up zerotier-cli join xxx
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.20.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.20.0/24' -o vmbr0 -j MASQUERADE
vmbr0是有正常网络的接口
zerotier控制面板加一个route即可。
然后就可以建立集群等等
评论 (0)