Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting exit node in Tailscale #816

Closed
johnpc opened this issue Oct 26, 2023 · 1 comment
Closed

Allow setting exit node in Tailscale #816

johnpc opened this issue Oct 26, 2023 · 1 comment

Comments

@johnpc
Copy link
Contributor

johnpc commented Oct 26, 2023

I am using an exit node that I'd like to run all my Umbrel's traffic through.

It is easy to set the exit node on other devices (see screenshots of how this is set on Mac and iOS devices)

iOS UI to set exit node:

IMG_0876

Mac OS UI to set exit node:

Screenshot 2023-10-26 at 7 24 15 PM

However, Umbrel's Tailscale Web UI has nowhere for me to set which exit node to use:

Screenshot 2023-10-26 at 7 22 10 PM

Note that I don't want to use my Umbrel as an exit node. I want to point my umbrel to use my preferred exit node.

@johnpc
Copy link
Contributor Author

johnpc commented Oct 27, 2023

See also https://community.umbrel.com/t/make-tailscale-use-exit-node/11229/5

It appears to be a limitation of the tailscale docker image.

The docker image documents a TS_EXTRA_ARGS environment variable which passes extra args to tailscale set (see https://tailscale.com/kb/1282/docker/)

tailscale set allows the --exit-node <ip|name> flag (see https://tailscale.com/kb/1080/cli/#set)

Therefore we should be able to update the docker-compose.yml to use that environment variable like so:

services:
  web:
    network_mode: "host" # TODO: We can remove this later with some iptables magic
    image: tailscale/tailscale:v1.48.1@sha256:51c756718c30b15d1d3d228b1f4425cba646ec15da5d188a0d55c32b8ea4f378
    restart: on-failure
    stop_grace_period: 1m
    command: "sh -c 'tailscale web --listen 0.0.0.0:8240 & exec tailscaled --tun=userspace-networking'"
    volumes:
      - ${APP_DATA_DIR}/data:/var/lib
    environment:
      TS_EXTRA_ARGS: "--exit-node <ip|name>"

@johnpc johnpc closed this as completed Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant