docker-zerotier/README.md

38 lines
851 B
Markdown
Raw Normal View History

2016-07-25 23:06:25 +08:00
# Zerotier
## Build
```
docker build -t my/zerotier .
```
2018-10-10 22:19:47 +08:00
## Preconfig
2016-07-25 23:06:25 +08:00
You have to load `tun` module on docker host.
```
modprobe tun
```
2018-10-10 22:19:47 +08:00
## Run
2016-07-25 23:06:25 +08:00
```
2018-10-10 22:19:47 +08:00
docker-compose up -d
2016-07-25 23:06:25 +08:00
```
## Usage
### Create and Connect to network
2018-10-10 22:19:47 +08:00
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:
2016-07-25 23:06:25 +08:00
```
2018-10-10 22:19:47 +08:00
docker-compose exec zerotier zerotier-cli join 565799d8f6bba354
2016-07-25 23:06:25 +08:00
```
2018-10-10 22:19:47 +08:00
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
2016-07-26 20:47:16 +08:00
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.
2016-07-25 23:06:25 +08:00