#author("2026-02-19T15:37:10+00:00","default:wikiadmin","wikiadmin")
#author("2026-02-22T01:27:31+00:00","default:wikiadmin","wikiadmin")
-軽量VPNソリューション。OpenVPNよりいいらしいので試してみるか

*install & setting [#q0770940]

 dnf install -y wireguard-tools

 # store secretkey
 cd /etc/wireguard/
 # set permission for root only
 umask 077

*create private key and public key [#r78e0aed]

 wg genkey | tee client.key | wg pubkey > client.pub

*setting file [#q41b2d14]

 [Interface]
 Address = ServerのVPN IP/24
 ListenPort = 任意のポート
 PrivateKey = Serverの秘密鍵
 # 起動時にFW設定
 PostUp   = firewall-cmd --add-port=任意のポート/udp
 PostDown = firewall-cmd --remove-port=任意のポート/udp
 [Peer]
 PublicKey = Clientの公開鍵
 AllowedIPs = ClientのVPN IP/32

*client setting [#p5654fde]

**Mac [#sbeaad06]

アプリ立ち上げて、設定ファイルを読み込む

**Ubuntu [#k3cb4a25]

 /etc/wireguard/wg0.conf
 #ansibleでserver側に.sshに生成してあるのでそれを上記にコピー
 wg-quick up wg0
 sudo wg-quick up wg0

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS