差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:softether_vpn:wireguard [2022/06/22 10:52] – [クライアント公開鍵・秘密鍵の生成] ともやん | linux:softether_vpn:wireguard [2023/03/14 06:17] (現在) – [NDSS 2017: WireGuard: Next Generation Kernel Network Tunnel] ともやん | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== WireGuard ====== | + | ====== WireGuard |
{{: | {{: | ||
<WRAP minfont> | <WRAP minfont> | ||
行 16: | 行 16: | ||
SoftEther VPN の WireGuard サポートは **2021/ | SoftEther VPN の WireGuard サポートは **2021/ | ||
- | **2022/ | + | **2022/ |
この機能を試すためには [[.: | この機能を試すためには [[.: | ||
{{: | {{: | ||
行 24: | 行 24: | ||
[[git> | [[git> | ||
- | ==== WireGuard | + | ==== WireGuard |
+ | WireGuard Tools には **wg**、**wg-quick** が含まれていますが、公開鍵/ | ||
+ | 作業するマシンにインストールされていれば問題ないので、両方にインストールしておいても良い🤤\\ | ||
- | === サーバー上で WireGuard コマンドを使う === | + | === サーバー上 |
**wireguard-tools** をインストールする😉\\ | **wireguard-tools** をインストールする😉\\ | ||
<WRAP color_term> | <WRAP color_term> | ||
行 94: | 行 96: | ||
**nonportable バケットの追加**\\ | **nonportable バケットの追加**\\ | ||
<WRAP color_term> | <WRAP color_term> | ||
- | <WRAP color_command>< | + | <WRAP color_command>< |
- | $ scoop bucket add nonportable | + | <b class=GRN> |
- | </code></ | + | </pre></ |
<WRAP color_result>< | <WRAP color_result>< | ||
Checking repo... ok | Checking repo... ok | ||
行 105: | 行 107: | ||
**wireguard-np のインストール**\\ | **wireguard-np のインストール**\\ | ||
<WRAP color_term> | <WRAP color_term> | ||
- | <WRAP color_command>< | + | <WRAP color_command>< |
- | $ sudo scoop install wireguard-np | + | <b class=GRN> |
- | </code></ | + | </pre></ |
<WRAP color_result>< | <WRAP color_result>< | ||
Installing ' | Installing ' | ||
行 121: | 行 123: | ||
※ 再起動なしで最新 Path を PowerShell の $env:Path に反映させる。\\ | ※ 再起動なしで最新 Path を PowerShell の $env:Path に反映させる。\\ | ||
<WRAP color_term> | <WRAP color_term> | ||
- | <WRAP color_command>< | + | <WRAP color_command>< |
- | $ $env:Path = [Environment]:: | + | <b class=GRN> |
- | </code></ | + | </pre></ |
または | または | ||
- | <WRAP color_command>< | + | <WRAP color_command>< |
- | $ $env:Path = [System.Environment]:: | + | <b class=GRN> |
- | </code></ | + | </pre></ |
</ | </ | ||
wg コマンドの動作確認。\\ | wg コマンドの動作確認。\\ | ||
<WRAP color_term> | <WRAP color_term> | ||
- | <WRAP color_command>< | + | <WRAP color_command>< |
- | $ wg --help | + | <b class=GRN> |
- | </code></ | + | </pre></ |
- | <WRAP color_result>< | + | <WRAP color_result>< |
- | Usage: C:\Program Files\WireGuard\wg.exe | + | Usage: C:\Program Files\WireGuard\wg.exe |
Available subcommands: | Available subcommands: | ||
行 149: | 行 151: | ||
pubkey: Reads a private key from stdin and writes a public key to stdout | pubkey: Reads a private key from stdin and writes a public key to stdout | ||
You may pass `--help' | You may pass `--help' | ||
- | </code></ | + | </pre></ |
</ | </ | ||
行 454: | 行 456: | ||
</ | </ | ||
- | ==== クライアント公開鍵をサーバーに登録 ==== | + | ==== クライアント公開鍵をサーバーに登録(WgkAdd) |
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
行 556: | 行 558: | ||
</ | </ | ||
- | ==== クライアント公開鍵をサーバーから削除 ==== | + | ==== クライアント公開鍵一覧(WgkEnum) ==== |
+ | <WRAP color_term> | ||
+ | <WRAP color_command>< | ||
+ | $ vpncmd localhost: | ||
+ | </ | ||
+ | <WRAP color_result>< | ||
+ | vpncmd コマンド - SoftEther VPN Developer Edition コマンドライン管理ユーティリティ | ||
+ | SoftEther VPN コマンドライン管理ユーティリティ (vpncmd コマンド) | ||
+ | Developer Edition | ||
+ | Version 5.02 Build 5180 | ||
+ | Compiled 2022/06/20 20:24:15 by tomoyan at skv001.monsters-g.com | ||
+ | Copyright (c) all contributors on SoftEther VPN project in GitHub. | ||
+ | Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. | ||
+ | All rights reserved. | ||
+ | |||
+ | パスワード: | ||
+ | |||
+ | VPN Server " | ||
+ | |||
+ | VPN Server 全体の管理権限があります。 | ||
+ | |||
+ | VPN Server> | ||
+ | WgkEnum コマンド - Wireguard 公開鍵一覧の取得 | ||
+ | コマンド " | ||
+ | |||
+ | [目的] | ||
+ | Wireguard 公開鍵一覧の取得 | ||
+ | |||
+ | [説明] | ||
+ | 現在サーバーに登録されている WireGuard 公開鍵の一覧を取得します。 | ||
+ | WgkAdd コマンドで公開鍵の追加を、WgkDelete コマンドで公開鍵の削除を行うことができます。 | ||
+ | このコマンドを実行するには、VPN Server の管理者権限が必要です。 | ||
+ | |||
+ | [使用方法] | ||
+ | WgkEnum | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP color_term> | ||
+ | <WRAP color_command>< | ||
+ | $ vpncmd localhost: | ||
+ | </ | ||
+ | <WRAP color_result>< | ||
+ | vpncmd コマンド - SoftEther VPN Developer Edition コマンドライン管理ユーティリティ | ||
+ | SoftEther VPN コマンドライン管理ユーティリティ (vpncmd コマンド) | ||
+ | Developer Edition | ||
+ | Version 5.02 Build 5180 | ||
+ | Compiled 2022/06/20 20:24:15 by tomoyan at skv001.monsters-g.com | ||
+ | Copyright (c) all contributors on SoftEther VPN project in GitHub. | ||
+ | Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation. | ||
+ | All rights reserved. | ||
+ | |||
+ | パスワード: | ||
+ | |||
+ | VPN Server " | ||
+ | |||
+ | VPN Server 全体の管理権限があります。 | ||
+ | |||
+ | VPN Server> | ||
+ | WgkEnum コマンド - Wireguard 公開鍵一覧の取得 | ||
+ | 公開鍵 | ||
+ | --------------------------------------------+-----------+---------- | ||
+ | kOHhTudkiKHHG/ | ||
+ | コマンドは正常に終了しました。 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== クライアント公開鍵をサーバーから削除(WgkDelete) | ||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
行 634: | 行 703: | ||
bool Enabled true | bool Enabled true | ||
string PresharedKey LejepJw9wyHqewP6UYIFJLeR+TMgvMKbMQ/ | string PresharedKey LejepJw9wyHqewP6UYIFJLeR+TMgvMKbMQ/ | ||
- | string PrivateKey YK7GR6jznS7nVtOaEldrr6iAMjrREKzWOn6NBcprHmc= | + | string |
} | } | ||
} | } | ||
行 642: | 行 711: | ||
公開鍵は秘密鍵(PrivateKey)から **wg pubkey** コマンドで生成する。\\ | 公開鍵は秘密鍵(PrivateKey)から **wg pubkey** コマンドで生成する。\\ | ||
<WRAP color_term> | <WRAP color_term> | ||
- | <WRAP color_command>< | + | <WRAP color_command>< |
- | $ echo YK7GR6jznS7nVtOaEldrr6iAMjrREKzWOn6NBcprHmc= | wg pubkey | + | $ echo <b class=DiYE> |
- | </code></ | + | </pre></ |
<WRAP color_result>< | <WRAP color_result>< | ||
BwXr25M3RARwvEWkFkzyHwd4hmhJ4qv7+w+YUrLV0XU= | BwXr25M3RARwvEWkFkzyHwd4hmhJ4qv7+w+YUrLV0XU= | ||
行 736: | 行 805: | ||
</ | </ | ||
+ | |||
+ | ===== WireGuard の技術資料 ===== | ||
+ | |||
+ | ==== NDSS 2017: WireGuard: Next Generation Kernel Network Tunnel ==== | ||
+ | [[https:// | ||
+ | 訳: WireGuard:次世代カーネルネットワークトンネル - NDSSシンポジウム\\ | ||
+ | |||
+ | **Slide**\\ | ||
+ | [[https:// | ||
+ | |||
+ | **Video**\\ | ||
+ | <WRAP youtube>< | ||
+ | <iframe width=" | ||
+ | allow=" | ||
+ | </ | ||
===== 参考文献 ===== | ===== 参考文献 ===== | ||
行 742: | 行 826: | ||
[[https:// | [[https:// | ||
[[so> | [[so> | ||
+ | [[https:// | ||