0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

warp-to-warpでRDP

Posted at

躓いたところ

  • warpはデフォルトでは「パブリックネットワーク」となり、Windows Defender ファイアウォールの設定が反映されなかった。
  • cloudflareダッシュボードがリニューアルしたため、どこに設定があるのか探し回った。

前置き

  • cloudflared(tunnel)ではない(比較的設定かんたん)
  • Peer-to-Peerで接続することになる(らしい)
  • Zero Trust無料版ではIPが固定できないので、接続先の仮想IPを調べる必要がある

準備

  • ホスト側(接続先デスクトップ)、クライアント側(接続元外出用ノートPC)、両方にwarp導入済み
  • Zero Trust導入済み

cloudflareダッシュボード側の設定

  • 2025/11/18ごろ?ダッシュボードがリニューアルしたので、場所や項目名が変わった。以下は新しい場所。

WARPにP2Pを許可

  • Team & Resources / Devices / Management
    • Peer-to-peer connectivityにある「Allow all Cloudflare One traffic to reach enrolled devices」をONに
    • Global WARP settingsにある「Assign a unique IP address to each device」と「Install CA to system certificate store」の2つをONに。

Split Tunnel

  • Team & Resources / Devices / Device profiles
    • 該当のprofile(なければnew)をEdit
      • 下の方にある Split Tunnels
      • Exclude IPs and domains を選ぶ
      • Manage
        • 100.64.0.0/10 を削除
        • 下記を追加 by Cloudflare Docs
          • 100.64.0.0/12
          • 100.81.0.0/16
          • 100.82.0.0/15
          • 100.84.0.0/14
          • 100.88.0.0/13
          • 100.112.0.0/12
      • 必要なら「Directly route Microsoft 365 traffic」もONに

CA証明書

  • Traffic policies / Traffic Settings の一番下にある。
    • 該当の証明書(なければnew)をAVAILABLEにした上で、IN-USEにする(IN-USEは不要かも?)
      • 何かのタイミングでINACTIVEになることがあるので、warpクライアントで証明書エラーが出たらまずはここを確認する。
    • Macだと、証明書を手動でTrustする必要。
      • キーチェーン(パスワードではない)から

ここまでで、WARPをONにすると、仮想IP(100.96.0.x)が割り振られるはず。

ホストWindows側の設定

  • WindowsファイアウォールにWARP仮想IPからのRDPを許可
    • 既存ルールのリモートアドレスに 100.96.0.0/12 を追加
    • もしくは新規でルール追加
# TCP 3389  100.96.0.0/12 から許可(Private/Domain)
New-NetFirewallRule -DisplayName "RDP TCP from WARP (100.96.0.0/12)" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 3389 -RemoteAddress 100.96.0.0/12 -Profile Domain,Private

# UDP 3389 も許可
New-NetFirewallRule -DisplayName "RDP UDP from WARP (100.96.0.0/12)" -Direction Inbound -Action Allow -Protocol UDP -LocalPort 3389 -RemoteAddress 100.96.0.0/12 -Profile Domain,Private

win11proのデフォルトでは、WARPはPublicネットワークになった。Privateに変更する。

Get-NetConnectionProfile

WARPのNameを確認。私は"CloudflareWARP"だった。これをPrivateに変更

Set-NetConnectionProfile -Name "CloudflareWARP" -NetworkCategory Private

WARPをつなぎ直す。ホストの仮想IP(warpから割り当てられたIP)を確認

(Get-NetAdapter -Name "CloudflareWARP" | Get-NetIPAddress -AddressFamily IPv4).IPAddress

このIPをゲストから接続先にすると、RDPできる。

今後

コマンドでwarpを接続するなら

warp-cli connect
  • ipconfigでアダプター名とIPv4を確認
  • WakeOnLanした時だけこの辺のコマンドを走らせて、どこかに投げてスマホから仮想IPを確認できるようにしたい。
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?