先日(3か月前)はConoHa VPS上のKUSANAGI環境にWordpressを導入しました。
![](https://smartphone-note.com/wp-content/uploads/2023/12/Article18-2.png)
カレンダーも届きました。
![](https://smartphone-note.com/wp-content/uploads/2023/12/405efa90721b1a01a766311b686d2b01-1024x715.jpg)
![](https://smartphone-note.com/wp-content/uploads/2023/05/00013-496763647-1-150x150.png)
ありがとうございました!
雑ではありますが、KUSANAGI managerとPST Managerを安全に利用する方法をまとめておきます。※コロナで自宅待機中
注意事項
ConoHa VPSにてCloudflareを利用している前提で話を進めます。とはいっても、ほかのVPSサービスでも応用が利くと思いますので参考にしていただければと思います。
また、無料で利用することはできますが、Cloudflare Zero Trustを利用するので決済情報が必要です。
なぜCloudflare Access・Tunnelを使うのか
KUSANAGI managerとPST ManagerはTLSで暗号化されていないためログイン情報が盗聴される恐れがあります。サーバーの管理画面のパスワードを安全に保つため、該当ポートを開かずにCloudflare Tunnel経由でアクセスしよう!、という話。
Cloudflare Zero Trustを設定
![](https://smartphone-note.com/wp-content/uploads/2024/03/34f439a9657c8eca6315eb02d4833b26.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/34f439a9657c8eca6315eb02d4833b26.png)
Zero Trustのメニューからアカウント設定へ
![](https://smartphone-note.com/wp-content/uploads/2024/03/d0bf409d1e141d86dd07c669de797d8b.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/d0bf409d1e141d86dd07c669de797d8b.png)
プランを選択
![](https://smartphone-note.com/wp-content/uploads/2024/03/91a91e9d5c0cf3b5ed861adff29b099b.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/91a91e9d5c0cf3b5ed861adff29b099b.png)
もちろん無料プラン
![](https://smartphone-note.com/wp-content/uploads/2024/03/1faa639925dae982d43486ffffde2b00-1024x607.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/1faa639925dae982d43486ffffde2b00-1024x607.png)
無料プランを選ぶと決済情報の入力画面に遷移します。お好みの決済手段を登録してください。
Cloudflare Tunnelの設定
![](https://smartphone-note.com/wp-content/uploads/2024/03/4c4f1b84d96bce8e3fe603002d33b8e0-1024x429.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/4c4f1b84d96bce8e3fe603002d33b8e0-1024x429.png)
Tunnelsから新しいトンネルを作成
![](https://smartphone-note.com/wp-content/uploads/2024/03/fb9b926f26d9699d869231e41356dd78-1024x798.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/fb9b926f26d9699d869231e41356dd78-1024x798.png)
CloudlinuxはRed Hat系なのでRed Hatを選択したうえで左側のコマンドをコピー
![](https://smartphone-note.com/wp-content/uploads/2024/03/6d2255eb1577ba50e58f671a93e3e625-1024x305.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/6d2255eb1577ba50e58f671a93e3e625-1024x305.png)
インストールが始まります。インストールが終わると下のようになります。
![](https://smartphone-note.com/wp-content/uploads/2024/03/6d8c13de22157213b13ce69ca73bc125.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/6d8c13de22157213b13ce69ca73bc125.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/3e1b28e7a8f8192ce5747f5b3b7e7eb5-1024x151.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/3e1b28e7a8f8192ce5747f5b3b7e7eb5-1024x151.png)
Connectorsに有効な接続が表示されたらOKです。
![](https://smartphone-note.com/wp-content/uploads/2024/03/337639132759711682593699ce87e85b-1024x496.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/337639132759711682593699ce87e85b-1024x496.png)
あとはこれに割り当てるドメインとパスを入力します。まずはPST Managerを追加してみましょう。
Public hostnameは自由に決めてもらってOK。
PST Managerを追加する場合はServiceのTypeにHTTPを選択しURLにlocalhost:61000と入力します。
![](https://smartphone-note.com/wp-content/uploads/2024/03/b2627e7630a5213e5c3af50b5fc9a878.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/b2627e7630a5213e5c3af50b5fc9a878.png)
これでSave tunnelを押せば完了。
![](https://smartphone-note.com/wp-content/uploads/2024/03/9cc5c7d3258c9f727500011d2bed07cc.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/9cc5c7d3258c9f727500011d2bed07cc.png)
終わったらYour tunnelsを開き先ほど設定したTunnelの設定を開きます。
![](https://smartphone-note.com/wp-content/uploads/2024/03/639ead22dc57d30864341892a964e17d.png)
![](https://smartphone-note.com/wp-content/uploads/2024/03/639ead22dc57d30864341892a964e17d.png)
Public Hostnameを開くと項目を追加することができるので、KUSANAGI managerを追加します。
PST Managerとほぼ変わりませんが、ServiceのURLの部分はlocalhost:60000にしてください。
これでパスワードを盗聴されるリスクが軽減されました。お疲れさまでした。
今日は疲れたのでここまでです。体調がよくなったらOAuth認証を設定する手順を紹介します。最後まで見ていただきありがとうございました。
コメント