Merge pull request #42 from shayne/master

Add Tailscale v1.4.2
This commit is contained in:
Derek Macias 2021-02-09 05:32:14 -07:00 committed by GitHub
commit 1c76917447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 163 additions and 0 deletions

View File

@ -0,0 +1,78 @@
# Tailscale
> "Private WireGuard® networks made easy"
> <br/> https://github.com/tailscale/tailscale
### Using
See https://www.tailscale.com to sign up and https://tailscale.com/kb/ for general usage information.
Manual package installation and usage for Unraid:
> :bulb: *Each step is performed **one-time** as initial setup, whereafter Tailscale will be logged in and running automatically on boot.*
1. Create persisted directory
```console
root@unraid:~# mkdir /boot/config/tailscale
```
2. Download `tailscale_XXX.txz` and move to `/boot/config/tailscale`
```console
root@unraid:~# cd /boot/config/tailscale
root@unraid:/boot/config/tailscale# wget <url-of-tailscale-XXX.txz>
```
3. Create empty `tailscaled.state` file
```console
root@unraid:~# touch /boot/config/tailscale/tailscaled.state
```
4. Append the following to `/boot/config/go`
```bash
installpkg /boot/config/tailscale/tailscale-XXX.txz
ln -s /boot/config/tailscale/tailscaled.state /var/lib/tailscale/tailscaled.state
/usr/sbin/tailscaled &
```
5. Stop file
* a) If `/boot/config/stop` does not exist create it
```console
root@unraid:~# echo -e '#!/bin/bash\n' > /boot/config/stop
root@unraid:~# chmod +x /boot/config/stop
```
* b) Append the following to `/boot/config/stop`
```bash
killall tailscaled
/usr/sbin/tailscaled --cleanup
```
6. Reboot Unraid
7. Authenticate by URL
```console
root@unraid:~# tailscale up
To authenticate, visit:
https://login.tailscale.com/a/abc123abc123
```
8. Check Tailscale IP and ping test server
```console
root@unraid:~# ip -4 addr show tailscale0
21: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc fq state UNKNOWN group default qlen 500
inet 100.XXX.XXX.XXX/32 scope global tailscale0
valid_lft forever preferred_lft forever
root@unraid:~# ping -c 1 100.101.102.103
PING 100.101.102.103 (100.101.102.103) 56(84) bytes of data.
64 bytes from 100.101.102.103: icmp_seq=1 ttl=64 time=90.5 ms
---100.101.102.103 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 90.476/90.476/90.476/0.000 ms
```
From here you're all set. Unraid is connected to Tailscale. You should be able to install and setup Tailscale on a
personal device and access your Unraid server from anywhere over your Tailscale VPN connection. No port-forwarding required.

View File

@ -0,0 +1,13 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
tailscale: tailscale
tailscale:
tailscale: The easiest, most secure, cross platform way to use WireGuard
tailscale: + oauth2 + 2FA/SSO
tailscale:

View File

@ -0,0 +1,72 @@
#!/bin/sh
# Slackware build script for nmon
# Copyright 2014 Georgi Kolev, Bulgaria
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=tailscale
VERSION=${VERSION:-1.4.2_amd64}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -eux
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf ${PRGNAM}-$VERSION
tar xvf $CWD/${PRGNAM}_$VERSION.tgz
cd ${PRGNAM}_$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
mkdir -p $PKG/usr/bin
cp $TMP/${PRGNAM}_$VERSION/tailscale $PKG/usr/bin/tailscale
mkdir -p $PKG/usr/sbin
cp $TMP/${PRGNAM}_$VERSION/tailscaled $PKG/usr/sbin/tailscaled
mkdir -p $PKG/var/run/tailscale
mkdir -p $PKG/var/lib/tailscale
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}

Binary file not shown.