-
-
Save openoms/0281e59b6b642731889fe207c8639b58 to your computer and use it in GitHub Desktop.
Add zerotier to TrueNAS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env sh | |
pkg install wget -y | |
echo "# Check the latest version at: https://www.freshports.org/net/zerotier/" | |
echo "# Which version to install?" | |
echo "# Example:" | |
echo "1.6.5" | |
read VERSION | |
echo "# Input the space seperated list of networks to join:" | |
echo "# Example is the public network Earth:" | |
echo "8056c2e21c000001" | |
read NETWORKS # Space seperated list of networks to join, default here is the public network Earth | |
wget http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/zerotier-${VERSION}.txz -O /tmp/zerotier-${VERSION}.txz | |
pkg add -f /tmp/zerotier-${VERSION}.txz | |
#autostart | |
echo 'zerotier_enable="YES"' > /etc/rc.conf | |
service zerotier start | |
for n in $NETWORKS; do | |
zerotier-cli join ${n} | |
done | |
zerotier-cli status | |
# if shows PORT_ERROR PRIVATE - acivate 'allow_tun' in the 'Custom Properties' of the jail | |
zerotier-cli listnetworks | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment