tailout is a command-line tool for quickly creating a cloud-based exit node in your tailnet.
To install tailout, you can download the latest release from the releases page.
You can also use the go install command:
go install github.com/lucacome/tailout@latestTo use tailout, you'll need to have the following installed:
- Tailscale
- An AWS account
At the moment, tailout only supports AWS as a cloud provider. Support for other cloud providers will be added in the future.
Go to your Tailscale API key settings and:
-
Create an API key for
tailout -
Create a file in
~/.tailout/config.yamlwith the following content:tailscale: api_key: tskey-api-xxx-xxx tailnet: <your tailnet name>
-
Run
tailout init, review the changes that will be done to your policy and accept
Next, you will also need to set up your AWS credentials. tailout will look for default credentials, like environment variables for access keys or an AWS profile.
To easily check if your credentials are set up correctly, you can use the aws sts get-caller-identity command.
Create an exit node in your tailnet:
tailout createConnect to your exit node:
tailout connectGet the status of your exit node:
tailout statusDisconnect from your exit node:
tailout disconnectDelete your exit node:
tailout stoptailout will look for a configuration file at the following paths:
/etc/tailout/config.{yml,yaml,hcl,json,toml}$HOME/.tailout/config.{yml,yaml,hcl,json,toml}
For exemple, you could have this content in /etc/tailout/config.yml:
tailscale:
api_key: tskey-api-xxx-xxx
tailnet: <your tailnet name>
region: eu-west-3
create:
shutdown: 15mYou can specify any of the above settings as command-line flags or environment variables prefixed by TAILOUT_.
For example, to specify the Tailscale API key, you can use the --tailscale-api-key flag or
the TAILOUT_TAILSCALE_API_KEY environment variable.
This repository contains code under the following terms:
- Portions derived from cterence/tailout remain licensed under the Apache License 2.0 (original work by the upstream authors).
- New contributions to this fork are made available under either the Apache License 2.0 OR the MIT License, at your option.
See LICENSE-APACHE and LICENSE-MIT for full license texts.