openwrtにtailscaleを追加する
OpenWrt 24.10.0に更新し、tailscaleをインストールしました。基本はopenwrt公式の方法で問題ありません。
携帯から自宅のサーバーにつなぎ自宅の回線でインターネットをすることを目的にします。自宅openwrtのwanからPPPoE接続している環境です。
opkg update && opkg install iptables ip6tables tailscale

Network → Interfaces → Add new interface
Name: tailscale
Protocol: Unmanaged
Device: tailscale0
Firewall settingでlanとリンクさせる方法でも可能ですが、
細かく制御したい場合はtailscale用のfirewallを作成します

ファイヤーウォール zone追加
Name: tailscale
Input: ACCEPT (default)
Output: ACCEPT (default)
Forward: ACCEPT
Masquerading: on
MSS Clamping: on
Covered networks: tailscale
Allow forward to destination zones: ルーターの通信をモバイル端末で使えるようにする wan lan
Allow forward from source zones: モバイル端末の通信をルーターで使えるようにする 空白
Allow forward to destination zonesをlanのみにするとインターネットにつながりません。wanのみにすると
また自宅サーバーにつながりません。今回は携帯からルーターへアクセスするだけなのでAllow forward from source zonesは空白にしています
openwrtで次を実行します
tailscale up –accept-routes –advertise-exit-node –advertise-routes=192.168.x.0/24
accept-routesはサブネット ルートの自動検出、 192.168.x.0/24は自身の環境に合わせます。–netfilter-mode=offは22.03では必須ですが、24.01では必要ありません
表示されるURLにアクセスしtailscaleにログインすると管理画面にルーターが登録されます

管理画面のルーターから Edit route settings からsubnet routesとexit nodeを有効にします。
携帯のtailscaleアプリからログインしてアクセスするだけです。
tailscaleにつないでいない状態
DNS_ServerName | IP | Response_Time | Average |
Google Primary | 8.8.8.8 | 762.7045 | 22.71983333 |
Google Primary | 8.8.8.8 | 24.7923 | |
Google Primary | 8.8.8.8 | 16.2882 | |
Google Primary | 8.8.8.8 | 13.4906 | |
Google Primary | 8.8.8.8 | 18.7202 | |
Google Primary | 8.8.8.8 | 18.8913 | |
Google Primary | 8.8.8.8 | 51.84 | |
Google Primary | 8.8.8.8 | 20.8488 | |
Google Primary | 8.8.8.8 | 20.2203 | |
Google Primary | 8.8.8.8 | 19.3868 | |
Google Secondary | 8.8.4.4 | 22.6601 | 20.38951 |
Google Secondary | 8.8.4.4 | 23.038 | |
Google Secondary | 8.8.4.4 | 18.1392 | |
Google Secondary | 8.8.4.4 | 18.5593 | |
Google Secondary | 8.8.4.4 | 16.0395 | |
Google Secondary | 8.8.4.4 | 21.5157 | |
Google Secondary | 8.8.4.4 | 20.544 | |
Google Secondary | 8.8.4.4 | 19.9864 | |
Google Secondary | 8.8.4.4 | 24.2447 | |
Google Secondary | 8.8.4.4 | 19.1682 | |
openwrt | 100.***.***.** | 9.1389 | 9.71597 |
openwrt | 100.***.***.** | 10.006 | |
openwrt | 100.***.***.** | 9.2468 | |
openwrt | 100.***.***.** | 9.5834 | |
openwrt | 100.***.***.** | 12.2122 | |
openwrt | 100.***.***.** | 9.3147 | |
openwrt | 100.***.***.** | 9.7202 | |
openwrt | 100.***.***.** | 9.5397 | |
openwrt | 100.***.***.** | 9.3972 | |
openwrt | 100.***.***.** | 9.0006 | |
cloudflare | 1.1.1.1 | 12.0571 | 12.22374 |
cloudflare | 1.1.1.1 | 11.7968 | |
cloudflare | 1.1.1.1 | 15.7901 | |
cloudflare | 1.1.1.1 | 13.4069 | |
cloudflare | 1.1.1.1 | 7.0597 | |
cloudflare | 1.1.1.1 | 13.4478 | |
cloudflare | 1.1.1.1 | 13.1163 | |
cloudflare | 1.1.1.1 | 12.1971 | |
cloudflare | 1.1.1.1 | 12.2038 | |
cloudflare | 1.1.1.1 | 11.1618 | |
ISP | ***.***.***.*** | 11.589 | 11.39383 |
ISP | ***.***.***.*** | 13.1392 | |
ISP | ***.***.***.*** | 11.3484 | |
ISP | ***.***.***.*** | 12.4867 | |
ISP | ***.***.***.*** | 11.8981 | |
ISP | ***.***.***.*** | 10.9722 | |
ISP | ***.***.***.*** | 11.6912 | |
ISP | ***.***.***.*** | 11.6097 | |
ISP | ***.***.***.*** | 11.9375 | |
ISP | ***.***.***.*** | 7.2663 |
tailscaleにつないでいる状態
DNS_ServerName | IP | Response_Time | Average |
Google Primary | 8.8.8.8 | 715.6198 | 13.52087778 |
Google Primary | 8.8.8.8 | 14.455 | |
Google Primary | 8.8.8.8 | 13.1093 | |
Google Primary | 8.8.8.8 | 14.0082 | |
Google Primary | 8.8.8.8 | 12.6194 | |
Google Primary | 8.8.8.8 | 13.7543 | |
Google Primary | 8.8.8.8 | 12.3082 | |
Google Primary | 8.8.8.8 | 13.4283 | |
Google Primary | 8.8.8.8 | 14.0581 | |
Google Primary | 8.8.8.8 | 13.9471 | |
Google Secondary | 8.8.4.4 | 7.2379 | 11.29841 |
Google Secondary | 8.8.4.4 | 12.0379 | |
Google Secondary | 8.8.4.4 | 12.3387 | |
Google Secondary | 8.8.4.4 | 7.3528 | |
Google Secondary | 8.8.4.4 | 7.7392 | |
Google Secondary | 8.8.4.4 | 12.7627 | |
Google Secondary | 8.8.4.4 | 13.9651 | |
Google Secondary | 8.8.4.4 | 12.7055 | |
Google Secondary | 8.8.4.4 | 14.0453 | |
Google Secondary | 8.8.4.4 | 12.799 | |
openwrt | 100.***.***.** | 13.7746 | 14.46324 |
openwrt | 100.***.***.** | 12.1168 | |
openwrt | 100.***.***.** | 14.2586 | |
openwrt | 100.***.***.** | 15.589 | |
openwrt | 100.***.***.** | 13.3877 | |
openwrt | 100.***.***.** | 21.2356 | |
openwrt | 100.***.***.** | 13.7076 | |
openwrt | 100.***.***.** | 12.7394 | |
openwrt | 100.***.***.** | 14.3978 | |
openwrt | 100.***.***.** | 13.4253 | |
cloudflare | 1.1.1.1 | 14.4725 | 13.0209 |
cloudflare | 1.1.1.1 | 12.6419 | |
cloudflare | 1.1.1.1 | 14.4942 | |
cloudflare | 1.1.1.1 | 13.2404 | |
cloudflare | 1.1.1.1 | 13.7963 | |
cloudflare | 1.1.1.1 | 8.0389 | |
cloudflare | 1.1.1.1 | 12.5456 | |
cloudflare | 1.1.1.1 | 13.5722 | |
cloudflare | 1.1.1.1 | 14.2542 | |
cloudflare | 1.1.1.1 | 13.1528 | |
ISP | ***.***.***.*** | 13.62 | 13.05625 |
ISP | ***.***.***.*** | 6.9548 | |
ISP | ***.***.***.*** | 17.2248 | |
ISP | ***.***.***.*** | 13.3688 | |
ISP | ***.***.***.*** | 14.0914 | |
ISP | ***.***.***.*** | 13.3208 | |
ISP | ***.***.***.*** | 13.202 | |
ISP | ***.***.***.*** | 13.3534 | |
ISP | ***.***.***.*** | 13.909 | |
ISP | ***.***.***.*** | 11.5175 |
何回か計測すると逆転も起こるので参考程度に
tailscaleをいれたOpenWrtのDNSのスピードを計測してみました。tailscaleによってDNSのスピードが9.71597から14.46324にダウンしていることがわかります。
何回やっても8.8.8.8は一回目はめちゃくちゃ遅くなりますので、平均から除いてます。最速はtailscaleにつないでいない状態でのopenwrt,最遅はtailscaleにつないでいない状態での8.8.8.8です。8.8.8.8より1.1.1.1のほうが速く安定している印象です。tailscaleは8.8.8.8と遜色ない速度が出ていていることがわかります。
AdguardHomeをいれてどこでも広告ブロックもできています。
ディスカッション
コメント一覧
まだ、コメントがありません