1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

IBM Cloud: Client VPN for VPC利用時の接続中ユーザーを確認する方法

Last updated at Posted at 2021-08-31

1. はじめに

Client VPN for VPCの概要や接続方法については、こちらの記事が参考になる。本稿では、落ち葉拾い的に、Client VPN for VPC利用時の接続中ユーザーを確認する方法について紹介したいと思う。

2. Customer Portalからの確認方法

Client VPN for VPCにおける認証方式は、

  • クライアント証明書
  • UserID/passcode
  • クライアント証明書とUserID/passcodeを両方使用(「どちらかで接続できる」という意味ではない)

のいずれかから選択できる。Customer Portalからも接続中ユーザーを確認することはできるのだが、残念ながらUser IDのフィールドしかないため、クライアント証明書を利用した接続では、誰が接続しているかわからない(注:将来的に改善される方向性にはあるようです)。

image.png

切断されたクライアントは1時間後に自動的にこのテーブルから削除されるようです。

https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-client-to-site-connections&interface=ui

The disconnected VPN client is automatically deleted after one hour.

3. CLIからの確認方法

CLIであれば、UserIDだけでなく、クライアント証明書のCN(Common Name)を表示する機能があるため、当面はこちらの方が役立ちそうである。

VPNサーバーの特定
# ibmcloud is vpn-servers
Listing VPN servers in all resource groups and region jp-tok under account xxx as user xxxxxxx@xx.xxx.com...
ID                                          Name          Status   Protocol   Host name                                        Port   Subnets                                Resource group
r022-35f58c82-814b-4005-a1a4-b4d882af39e3   syasuda-vpn   stable   udp        xxxxxxxxxxxx.xx-xxx.vpn-server.appdomain.cloud   443    sub-172-16-0-0-24                      Default
対象のVPNサーバーに接続中のクライアントを出力
# ibmcloud is vpn-server-clients r022-35f58c82-814b-4005-a1a4-b4d882af39e3
Listing clients of VPN server r022-35f58c82-814b-4005-a1a4-b4d882af39e3 under account xxx as user xxxxxxx@xx.xxx.com...
ID                                     Common name   User name   Status      Client IP       Remote IP      Remote port   Created
b1ff973b-38bb-4750-a014-b1e2542fa333   Taro-Yamada   -           connected   192.168.252.2   118.x.xx.xxx   59899         2021-09-01T08:33:20+09:00
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?