This StackScript automatically configures a Linode instance as a Tailscale Exit Node, allowing you to route your internet traffic through your Linode server when connected to Tailscale.
- 🚀 One-click setup of a Tailscale Exit Node on Linode
- 🔒 Proper firewall configuration with firewalld
- 🌐 Automatic IP forwarding configuration
- 🖥️ Optional SSH access via Tailscale network
- 📝 Comprehensive logging for troubleshooting
- A Linode account
- A Tailscale account
- A Tailscale auth key (generated from the Tailscale admin console)
- Log in to your Linode account
- Create a new Linode instance
- Select "StackScripts" from the Create tab
- Choose "Community StackScripts" and search for "Tailscale Exit Node"
- Select this StackScript and fill in the required fields:
- Tailscale Auth Key: Your Tailscale auth key
- Hostname: A name for your Exit Node (default: Tailscale-Gateway)
- Enable SSH access via Tailscale: Choose whether to allow SSH from Tailscale network (yes/no)
Once the Linode is deployed and the script completes:
-
Approve the Exit Node in the Tailscale admin console: https://login.tailscale.com/admin/machines
-
To use this Exit Node from any of your Tailscale-connected devices, run:
tailscale up --exit-node=<hostname>or
tailscale up --exit-node=<tailscale-ip> -
To check the Exit Node status:
tailscale status tailscale exit-node list
- Use a reusable auth key if you plan to redeploy this script multiple times
- For improved security, set an expiration time on your auth key
- Consider using a key with limited permissions (only node registration)
- Check the log file at
/var/log/stackscript.logfor detailed script execution output - Verify Tailscale status with
tailscale status - Check system logs with
journalctl -u tailscaled - Ensure firewalld is properly configured with
firewall-cmd --list-all
- This script configures your Linode as an internet gateway for your Tailscale network
- All traffic from connected devices can potentially route through this server when used as an Exit Node
- Consider implementing additional security measures based on your requirements
Contributions are welcome! Please feel free to submit a Pull Request.
This script is provided under the MIT License. See the LICENSE file for details.