some updates

This commit is contained in:
crocandr 2018-10-10 14:19:47 +00:00
parent 9da34ef344
commit 79b6a03c22
3 changed files with 18 additions and 10 deletions

View file

@ -6,4 +6,4 @@ RUN curl -L -o /tmp/zerotier-install.sh https://install.zerotier.com/ && bash /t
COPY files/start.sh /opt/start.sh
RUN chmod 755 /opt/start.sh
ENTRYPOINT /opt/start.sh

View file

@ -6,7 +6,7 @@
docker build -t my/zerotier .
```
## Run
## Preconfig
You have to load `tun` module on docker host.
@ -14,24 +14,24 @@ You have to load `tun` module on docker host.
modprobe tun
```
... and you can start ZeroTier container with this command.
## Run
```
docker run -tid --name=zerotier --privileged --net=host --privileged my/zerotier /opt/start.sh
docker-compose up -d
```
## Usage
### Create and Connect to network
1. You have to register ZeroTier service on https://my.zerotier.com page.
2. You have to create a network on the zerotier's page (You got a Network ID like: 565799d8f6bba354 )
3. You have to join with the ZeroTier node
1. ceate a ZeroTier service account on https://my.zerotier.com
2. create a network on the zerotier's page (You got a Network ID like: 565799d8f6bba354 )
3. join the Zerotier node to the network:
```
docker exec -ti zerotier zerotier-cli join 565799d8f6bba354
docker-compose exec zerotier zerotier-cli join 565799d8f6bba354
```
4. You have to add a Managed Routes and Managed IPs for the VPN hosts
5. some seconds later, the You got a new tz0 (or something similar) NIC on your docker host, and You can ping other hosts
4. check "auth" option on the new host line on ZeroTier page
5. some seconds later, the You got a new zt0 (or something similar) NIC on your docker host, and You can ping other hosts
You can choose working mode on the web page. If you turn on bridge (mode) on the web site, you can create site2site vpn solution with some ZeroTier nodes easily.

8
docker-compose.yml Normal file
View file

@ -0,0 +1,8 @@
version: '3'
services:
zerotier:
image: croc/zerotier
network_mode: host
privileged: true
restart: always