LinuxCommandLibrary

tailscale-set

Configure Tailscale settings

TLDR

View documentation for tailscale up

$ tldr tailscale up
copy

SYNOPSIS

tailscale set [flags]

PARAMETERS

accept-routes
    Accept routes advertised by other Tailscale nodes. Takes a comma-separated list of IPv4 and IPv6 prefixes. Empty string disables all remote routes. 'true' or '*' enable all routes.

advertise-exit-node
    Whether to advertise this node as an exit node, allowing other devices on your tailnet to route all traffic through it. Takes a boolean value (true/false).

advertise-routes
    Advertises routes to other nodes on your tailnet. Takes a comma-separated list of IPv4 and IPv6 prefixes.

hostname
    Sets the Tailscale hostname for the node. This overrides the system hostname.

netfilter-purge-iptables
    Purges iptables rules. Takes a boolean value (true/false). Defaults to false. Use with extreme caution.

dns
    Enables or disables overriding system DNS settings with Tailscale DNS settings. Takes a boolean value (true/false).

exit-node
    Sets the preferred Exit Node. Takes IP of an exist node machine

exit-node-allow-lan-access
    Determines if the Exit Node advertises access to the local network of the exit node. Takes a boolean value (true/false).

DESCRIPTION

The `tailscale set` command is used to modify Tailscale node configuration settings directly. It provides a way to apply settings without restarting the Tailscale daemon. This includes modifying DNS settings, hostname overrides, routes, and other parameters. The settings applied using `tailscale set` are generally persistent across reboots, unless explicitly overridden or removed. This command is a powerful tool for administrators to configure Tailscale clients programmatically or in automated deployments.

Using `tailscale set` offers a more dynamic and direct approach to configuration management compared to editing configuration files directly. It helps maintain consistency and reduce errors, especially when managing large networks with many Tailscale nodes. Improper usage can lead to network disruptions, so always exercise caution and refer to the official Tailscale documentation.

CAVEATS

Improper use of `tailscale set` can lead to network connectivity issues or security vulnerabilities. Carefully review changes before applying them. Consider testing settings on a non-production node before deploying to the entire network. Some settings may require a restart of the Tailscale daemon to take full effect, although `tailscale set` is designed to minimize the need for restarts.

EXAMPLES

To advertise a route:
tailscale set advertise-routes=192.168.0.0/24

To accept all remote routes:
tailscale set accept-routes=*

To advertise as an exit node:
tailscale set advertise-exit-node=true

To clear all flags:
tailscale set accept-routes="" advertise-routes="" advertise-exit-node=false hostname=""

SEE ALSO

tailscale(1), tailscale up(1), tailscale down(1), tailscale status(1)

Copied to clipboard