OpenSource-Hub

tailscale

CLI ツール

tailscale/tailscale

二要素認証を統合した、最も簡単で安全な WireGuard VPN ツール。

概要

Tailscale は WireGuard をベースとしたゼロ設定 VPN ソリューションで、二要素認証とシングルサインオンを内蔵しています。オープンソースリポジトリにはデーモンとコマンドラインツールが含まれており、Linux、Windows、macOS をサポートしています。複雑なファイアウォール設定なしで、安全なピアツーピア接続を実現できます。

README プレビュー

# Tailscale\n\nhttps://tailscale.com\n\nPrivate WireGuard® networks made easy\n\n## Overview\n\nThis repository contains the majority of Tailscale's open source code.\nNotably, it includes the `tailscaled` daemon and\nthe `tailscale` CLI tool. The `tailscaled` daemon runs on Linux, Windows,\n[macOS](https://tailscale.com/kb/1065/macos-variants/), and to varying degrees\non FreeBSD and OpenBSD. The Tailscale iOS and Android apps use this repo's\ncode, but this repo doesn't contain the mobile GUI code.\n\nOther [Tailscale repos](https://github.com/orgs/tailscale/repositories) of note:\n\n* the Android app is at https://github.com/tailscale/tailscale-android\n* the Synology package is at https://github.com/tailscale/tailscale-synology\n* the QNAP package is at https://github.com/tailscale/tailscale-qpkg\n* the Chocolatey packaging is at https://github.com/tailscale/tailscale-chocolatey\n\nFor background on which parts of Tailscale are open source and why,\nsee [https://tailscale.com/opensource/](https://tailscale.com/opensource/).\n\n## Using\n\nWe serve packages for a variety of distros and platforms at\n[https://pkgs.tailscale.com](https://pkgs.tailscale.com/).\n\n## Other clients\n\nThe [macOS, iOS, and Windows clients](https://tailscale.com/download)\nuse the code in this repository but additionally include small GUI\nwrappers. The GUI wrappers on non-open source platforms are themselves\nnot open source.\n\n## Building\n\nWe always require the latest Go release, currently Go 1.26. (While we build\nreleases with our [Go fork](https://github.com/tailscale/go/), its use is not\nrequired.)\n\n```\ngo install tailscale.com/cmd/tailscale{,d}\n```\n\nIf you're packaging Tailscale for distribution, use `build_dist.sh`\ninstead, to burn commit IDs and version info into the binaries:\n\n```\n./build_dist.sh tailscale.com/cmd/tailscale\n./build_dist.sh tailscale.com/cmd/tailscaled\n```\n\nIf your distro has conventions that preclude the use of\n`build_dist.sh`, please do the

FAQ (5)

トラブル対応
Tailscale Android の split tunneling allowlist モード使用時に DNS 解決が失敗する問題を修正する方法は?

根本原因:Tailscale for Android が allowlist(include)モードでスプリットトンネリングを実行する際、Tailscale アプリ自体が許可リストに自動的に追加されなかったため、Tailscale プロセスが VPN から除外されます。これにより、サブネットルーティングが正常に動作している場合でも、許可されたアプリは Tailscale の DNS リゾルバーに到達できません。allowlist モードには MDM が必要であると記載された古いドキュメントは時代遅れです。この機能には MDM の制限がなくなりました。この問題は、Android 17 およびその他のサポートされている Android バージョンで Tailscale v1.98.8 に影響します。

解決策:
1. 即時の一時的な回避策:スプリットトンネリングをデフォルトの blocklist モードに戻し、allowlist モードで許可したものと同じアプリのセット以外のすべてのアプリをブロックします。DNS 解決は直ちに復旧します。
2. 恒久的な修正:公式パッチは https://pkgs.tailscale.com/unstable/ で入手可能な unstable ビルドに含まれています。この unstable ビルドにアップグレードして問題を解決するか、修正を含む今後の安定版リリースをお待ちください。

参照 Issue #20978
トラブル対応
引数なしの 'tailscale up' が、advertised tags を持つノードがすでに Running 状態のときにハングして戻ってこないのはなぜですか?

これは Tailscale 1.102.5 (Linux) の既知のバグです: ノードがすでに Running 状態で AdvertiseTags が設定されている場合、フラグなしの tailscale up が永久にブロックされ、最終的に context canceled で終了します (例: timeout 下では exit 124)。ノードはオンラインのまま正常に機能し続け、ハングするのは CLI のみです。回避策:

1. コマンドを実行する前に状態を確認し、すでに起動済みであればスキップします:

if [ "$(tailscale status --json --peers=false | jq -r .BackendState)" != "Running" ]; then
  sudo tailscale up
fi

2. tailscale up をどうしても実行する必要がある場合 (例: 状態を復旧するため)、タグを含む非デフォルトのフラグ一式をすべて指定し、timeout でラップしてください:

timeout 30 sudo tailscale up --advertise-tags=tag:your-tag --ssh --accept-routes

既存のフラグをすべて付けて up を再実行すると、CLI がタグの変更がないことを検出し、高速な edit-and-return パスを通るため、即座に戻ります。

根本原因: フラグなしの up はタグフラグのない 'simpleUp' として扱われるため、CLI はタグが変更されたと見なし、高速な justEdit リターンパスを無効化した上で、IPN の Running 通知を待ち続けます。しかし、tailscaled は状態遷移を行わないため (WantRunning はすでに true)、この通知は発生しません。タグのないノードは影響を受けず、即座に戻ります。

参照 Issue #21774
トラブル対応
macOSアプリからSafariでTailscale Admin Consoleを開いたときの「Error 401 - bad tailscale-authstate2 cookie」の修正方法

このエラーは、SafariでApple SSOを使用しているときに、Tailscale macOSメニューバーアプリのAdmin Consoleボタンをクリックすると発生します。アプリはcontrolplane.tailscale.com/loginを開き、そこでそのサブドメインにtailscale-authstate2クッキーが設定されますが、AppleのOAuthはlogin.tailscale.comへリダイレクトで戻ります。Safariの厳格なクッキースコープによりサブドメイン間でクッキーが送信されないため、401エラーが発生します(ChromeはLax+POSTの緩和期間があるため動作します)。

**回避策:** アプリのAdmin Consoleボタンを使う代わりに、ブラウザでhttps://login.tailscale.com/adminに直接アクセスしてください。ログインとクッキーがOAuthのredirect_uriと同じドメインに留まるため、Apple SSOが成功します。

**恒久的な修正(Tailscaleのサーバーサイドでの変更が必要):** tailscale-authstate2クッキーにDomain=.tailscale.comを設定するか、macOSアプリを更新してhttps://login.tailscale.com/adminを直接開くようにするかのいずれかです。

参照 Issue #20342
トラブル対応
MullvadのパブリックDNSの提供終了後(194.242.2.2が機能しなくなった場合)、Mullvadのエグジットノード使用時にDNSが機能しなくなる問題を修正する方法

Mullvadは公開暗号化DNSサーバーを閉鎖しており、194.242.2.2(2023年以降Mullvad出口ノード向けに通知されてきたリゾルバー)は2026-11-02に応答を停止するため、出口ノードユーザーのDNSが機能しなくなります。修正方法:194.242.2.2ではなく、Mullvadのトンネル内リゾルバー10.64.0.1をMullvad出口ノード向けに通知するリリースにアップデートしてください。このリゾルバーはトンネル内で動作し、今回の閉鎖の影響を受けません。手動での回避策:出口ノードのDNS設定を上書きして10.64.0.1を使用するようにしてください(Mullvadトンネル経由でのみ到達可能です)。トンネル外でMullvadの公開DNSを使用していた場合は、Mullvadが公式に推奨し、現在スポンサーとなっているQuad9(9.9.9.9)に切り替えてください。

参照 Issue #21192
トラブル対応
セキュリティスキャナーでGoプロジェクトをビルドする際にgolang.org/x/netの脆弱性アラートを修正するにはどうすればよいですか?

golang.org/x/net を v0.59.0 から v0.60.0 にアップグレードし、Go 1.27.2 ツールチェーンを使用してください。次を実行します:

go get golang.org/x/net@v0.60.0
go mod tidy

Tailscale の場合は、go.toolchain.rev も Go 1.27.2 ツールチェーンのコミット(186053ab2af2ef8fc43f3c1d1150216e89d4aff0)に更新し、その後リビルドして再スキャンしてください。これにより、脆弱なコードパスが実行時に使用されていない場合でも、スキャナーの検出結果がクリアされます。

参照 Issue #21723