Tailscale Exit Node Setup

This utility provides an interactive script to install and configure Tailscale as an exit node on a Debian-based system. It also installs and configures ufw (Uncomplicated Firewall) to secure the machine.

The script will install Tailscale, prompt you to authenticate, and then configure it as an exit node. It will also set up firewall rules and apply network optimizations to ensure reliable and performant operation, including support for Tailscale's Peer Relay and DERP fallback mechanisms.


How the Script Works: A Detailed Breakdown

The installation script is designed to be safe and transparent. Here is a step-by-step explanation of what it does:

Step 1: System Preparation

Step 2: Tailscale Repository and Package Installation

Step 3: Automatic Security Updates for Tailscale

Step 4: Network Performance and Forwarding

Step 5: Peer Relay Configuration

Step 6: Firewall Configuration (UFW)

Step 7: Tailscale Configuration and Authentication


Recommended VPS Providers

Looking for a reliable and affordable server to run your Tailscale exit node? Here are a few providers I recommend. These are affiliate links, which means I may earn a commission if you sign up through them, at no extra cost to you.


Automated Installation

To install, run the following command in your terminal. This will download the script and execute it in a way that allows for user interaction during the setup process.

Using curl:

sudo bash -c "$(curl -sL https://random.clusterlabs.dev/scripts/tailscale-exit/install.sh)"

Using wget:

sudo bash -c "$(wget -qO- https://random.clusterlabs.dev/scripts/tailscale-exit/install.sh)"

Download install.sh

Installation Script Content:


Automated Uninstallation

To remove the configuration, run the corresponding command below. This will download the uninstallation script and pipe it to bash with sudo, which will remove Tailscale and the firewall rules.

Using curl:

curl -sL https://random.clusterlabs.dev/scripts/tailscale-exit/uninstall.sh | sudo bash

Using wget:

wget -qO- https://random.clusterlabs.dev/scripts/tailscale-exit/uninstall.sh | sudo bash

Download uninstall.sh

Uninstallation Script Content: