tailscaleにWSL2からつないでみた
環境
- WSL2
- Ubuntu 20
インストール
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.gpg | sudo apt-key add -
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.list | sudo tee /etc/apt/sources.list.d/tailscale.list
sudo apt-get update
sudo apt-get install tailscale
起動
daemon起動
sudo tailscaled
tailscaleのサイトからone-off keyをゲット
https://login.tailscale.com/admin/settings/authkeys
One-off key
Generate one-off key
ゲットしたone-off keyを使ってtailscaleに接続
sudo tailscale up --authkey=XXXXXXXXXX
動作確認
$ ping 100.101.102.103
PING 100.101.102.103 (100.101.102.103) 56(84) bytes of data.
64 bytes from 100.101.102.103: icmp_seq=1 ttl=64 time=1811 ms
64 bytes from 100.101.102.103: icmp_seq=2 ttl=64 time=764 ms
64 bytes from 100.101.102.103: icmp_seq=3 ttl=64 time=327 ms
64 bytes from 100.101.102.103: icmp_seq=4 ttl=64 time=340 ms
64 bytes from 100.101.102.103: icmp_seq=5 ttl=64 time=365 ms
64 bytes from 100.101.102.103: icmp_seq=6 ttl=64 time=387 ms
64 bytes from 100.101.102.103: icmp_seq=7 ttl=64 time=334 ms
64 bytes from 100.101.102.103: icmp_seq=8 ttl=64 time=535 ms
64 bytes from 100.101.102.103: icmp_seq=9 ttl=64 time=356 ms
64 bytes from 100.101.102.103: icmp_seq=10 ttl=64 time=378 ms
トラブルシューティング
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.gpg | sudo apt-key add -
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.list | sudo tee /etc/apt/sources.list.d/tailscale.list
sudo apt-get update
sudo apt-get install tailscale
起動
daemon起動
sudo tailscaled
tailscaleのサイトからone-off keyをゲット
https://login.tailscale.com/admin/settings/authkeys
One-off key
Generate one-off key
ゲットしたone-off keyを使ってtailscaleに接続
sudo tailscale up --authkey=XXXXXXXXXX
動作確認
$ ping 100.101.102.103
PING 100.101.102.103 (100.101.102.103) 56(84) bytes of data.
64 bytes from 100.101.102.103: icmp_seq=1 ttl=64 time=1811 ms
64 bytes from 100.101.102.103: icmp_seq=2 ttl=64 time=764 ms
64 bytes from 100.101.102.103: icmp_seq=3 ttl=64 time=327 ms
64 bytes from 100.101.102.103: icmp_seq=4 ttl=64 time=340 ms
64 bytes from 100.101.102.103: icmp_seq=5 ttl=64 time=365 ms
64 bytes from 100.101.102.103: icmp_seq=6 ttl=64 time=387 ms
64 bytes from 100.101.102.103: icmp_seq=7 ttl=64 time=334 ms
64 bytes from 100.101.102.103: icmp_seq=8 ttl=64 time=535 ms
64 bytes from 100.101.102.103: icmp_seq=9 ttl=64 time=356 ms
64 bytes from 100.101.102.103: icmp_seq=10 ttl=64 time=378 ms
トラブルシューティング
sudo tailscaled
https://login.tailscale.com/admin/settings/authkeys
One-off key
Generate one-off key
sudo tailscale up --authkey=XXXXXXXXXX
$ ping 100.101.102.103
PING 100.101.102.103 (100.101.102.103) 56(84) bytes of data.
64 bytes from 100.101.102.103: icmp_seq=1 ttl=64 time=1811 ms
64 bytes from 100.101.102.103: icmp_seq=2 ttl=64 time=764 ms
64 bytes from 100.101.102.103: icmp_seq=3 ttl=64 time=327 ms
64 bytes from 100.101.102.103: icmp_seq=4 ttl=64 time=340 ms
64 bytes from 100.101.102.103: icmp_seq=5 ttl=64 time=365 ms
64 bytes from 100.101.102.103: icmp_seq=6 ttl=64 time=387 ms
64 bytes from 100.101.102.103: icmp_seq=7 ttl=64 time=334 ms
64 bytes from 100.101.102.103: icmp_seq=8 ttl=64 time=535 ms
64 bytes from 100.101.102.103: icmp_seq=9 ttl=64 time=356 ms
64 bytes from 100.101.102.103: icmp_seq=10 ttl=64 time=378 ms
WSLから100.101.102.103にはpingが飛ぶのだがプロジェクトのサーバにはpingが飛ばない。
一方で、Windowsの方にtailscaleを入れたらプロジェクトのサーバにpingは飛び、WSLからも接続できた。しかし今度は100.101.102.103にはpingが飛ばなくなった。
参考
Author And Source
この問題について(tailscaleにWSL2からつないでみた), 我々は、より多くの情報をここで見つけました https://qiita.com/saru2017/items/7264c0d08f115d079199著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .