af47c80012
* Create boot script for Tailscale container * Add some polish, update docs and make script easier to use |
||
---|---|---|
.. | ||
on_boot.d | ||
README.md |
Tailscale
Run Tailscale in a container on your Unifi Dream Machine. In combination with the DNS modules, setting up a Tailscale exit node on the UDM Pro can be quite powerful. Additionally, the UDM is well positioned to add a tailscale subnet router to permit remote access to the manged network.
Prerequisites
Follow the instructions and set up the scripts in these directories (in order) before continuing further:
on-boot-script
container-common
cni-plugins
- (optional, but recommended if you want to set up an exit node and benefit from ad-blocking)
dns-common
followed by your favorite DNS server such asrun-pihole
orAdguardHome
Installation
- Copy
on_boot.d/20-tailscale.sh
to/mnt/data/on_boot.d/20-tailscale.sh
. - Make sure the boot script is executable with
chmod +x /mnt/data/on_boot.d/20-tailscale.sh
.
Tailscale Configuration
After installing the boot script, you will want to set up the included shell alias and check network connectivity before continuing.
- Run
/mnt/data/on_boot.d/20-tailscale.sh alias
to print a helpful shell alias to the terminal, inside a shell comment. - Add the alias to your running session, after which you can run
tailscale status
ortailscale netcheck
from the host shell to make sure the running tailscale agent is healthy and has a good network connection. /mnt/data/on_boot.d/20-tailscale.sh status
will also perform status checks, if the alias setup isn't working for some reason.
How to proceed from here is largely up to you. It is possible to authenticate by simply running tailscale up
(if you installed the shell alias) and doing most of the rest of the configuration in the admin console. You will likely want to provide additional options to tailscale up
to use an auth key, advertise tags or subnet routes, or other configuration.