mirror of
https://github.com/unifi-utilities/unifios-utilities.git
synced 2024-08-30 18:32:21 +00:00
Add a zerotier VPN container (#191)
Co-authored-by: Jon Stroud <jon.stroud@keysight.com>
This commit is contained in:
parent
dbf8c79270
commit
ecd8ee37e9
10
zerotier-one/20-zerotier.sh
Executable file
10
zerotier-one/20-zerotier.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
CONTAINER=zerotier-one
|
||||
# Starts a wireguard container that is deleted after it is stopped.
|
||||
# All configs stored in /mnt/data/wireguard
|
||||
if podman container exists ${CONTAINER}; then
|
||||
podman start ${CONTAINER}
|
||||
else
|
||||
podman run --device=/dev/net/tun --net=host --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --cap-add=CAP_SYS_RAWIO -v /mnt/data/zerotier-one:/var/lib/zerotier-one --name zerotier-one -d bltavares/zerotier
|
||||
fi
|
||||
|
25
zerotier-one/README.md
Normal file
25
zerotier-one/README.md
Normal file
@ -0,0 +1,25 @@
|
||||
# Run ZeroTier VPN on your UDM
|
||||
|
||||
## Install
|
||||
1. Copy 20-zerotier.sh to /mnt/data/on_boot.d
|
||||
2. Create directories for persistent Zerotier configuration
|
||||
|
||||
```
|
||||
mkdir -p /mnt/data/zerotier-one
|
||||
```
|
||||
3. Start the zeriotier container
|
||||
```
|
||||
podman run -d \
|
||||
--name zerotier-one \
|
||||
--device=/dev/net/tun \
|
||||
--net=host \
|
||||
--cap-add=NET_ADMIN \
|
||||
--cap-add=SYS_ADMIN \
|
||||
--cap-add=CAP_SYS_RAWIO \
|
||||
-v /mnt/data/zerotier-one:/var/lib/zerotier-one \
|
||||
bltavares/zerotier
|
||||
```
|
||||
4. Join your zerotier network
|
||||
```
|
||||
podman exec zerotier-one zerotier-cli join <your network id>
|
||||
```
|
Loading…
Reference in New Issue
Block a user