Community discussions

MikroTik App
 
elbob2002
Member Candidate
Member Candidate
Topic Author
Posts: 252
Joined: Tue May 15, 2018 8:15 pm
Location: Ireland

Zerotier in a container on CHR

Wed Oct 19, 2022 10:45 pm

You can run Zerotier in a container on CHR.

I've had success with this one:

https://github.com/zyclonite/zerotier-docker

Instead of using a seperate subnet for the veth interface needed for Docker I just added the veth interface to the existing bridge.

Probably not good practice but it works! Change IP, Bridge names, interface name and disk to suit:
/interface/veth/add name=veth1 address=10.13.0.2/24 gateway=10.13.0.1
/interface/bridge/port add bridge=bridge1 interface=veth1
/container/envs/add key=net name=zt value=host
/container/envs/add key=cap-add name=zt value=NET_ADMIN
/container/envs/add key=device name=zt value=/dev/net/tun
/container/config/set registry-url=https://registry-1.docker.io tmpdir=disk1/pull
/container/add remote-image=zyclonite/zerotier:latest interface=veth1 root-dir=disk1/zerotier envlist=zt
Then shell into your container and join your Zerotier Network.

You can use the IP address of the Zerotier network as a gateway to the networks attached or accessible to your CHR or advertise it etc using the IP address of your veth interface as the gateway to your Zerotier Network.

Who is online

Users browsing this forum: johannwill and 4 guests