LoginSignup
17
14

More than 5 years have passed since last update.

Linux用のCisco AnyConnect Clientを入手できない時の代替手段

Last updated at Posted at 2019-01-04

はじめに

Cisco新製品の動作確認をしたり、REST APIやOn-Box Pythonを使った開発を行ったりする際、無料で利用できるCisco DevNetやdCloudのSandbox環境は非常に便利です。

DevNetの場合、2019年1月時点で、ACI、DNA、SD-WAN等のカテゴリー毎に計68のSandboxが提供されており、「Always-On(いつでもだれでも利用できる環境)」と「Reserve(予約が必要な専有環境)」のいずれかもしくは両方が提供されています。

後者の場合、Cisco AnyConnect Secure Mobility Client(AnyConnect Client)を使い、自分のPCとCisco環境の間でVPNをはってアクセスする形になります。

WindowsやMac OS XからVPN接続する場合は、以下手順通りに実施すれば、接続可能です。

一方Linuxの場合、インストールガイドに手順は記載されているものの、肝心のAnyConnectのファイルがダウンロードサイトから消えていました。

そこで、インターネットで代替手段を検索したところ、シンプルなものから複雑なものまで、中にはどこかの大学のアカウントを持っていることが前提の手順など、様々なものが見つかりました。
その中で、おそらく一番シンプルで、自分の環境でうまく行った手順についてメモしておきたいと思います。

セットアップ環境と必要なパッケージ

以下の環境でセットアップを行いました。

No. ハード/パッケージ バージョン
1 CentOS 7.5.1804
2 epel-release 7-11
3 openconnect 7.08-1.el7

ちなみにNo.3のOpenConnectは、以下ベンダー製品とのVPN接続をサポートするために作られたLinux用SSL VPN Clientで、ベンダー公式サポートのものではありません。

  • Cisco AnyConnect SSL VPN
  • Juniper SSL VPN(Pulse Connect Secure)
  • Palo Alto Networks GlobalProtect SSL VPN

詳細はOpenConnectのサイトに記載されています。

接続手順

epel-releaseのインストール

[user@localhost ~]$ sudo yum install epel-release

openconnectのインストール

[user@localhost ~]$ sudo yum install openconnect

VPN接続

Sandboxの予約時にメールで届いたLab Network Addressを元に、openconnectコマンドを実行します。
途中サーバを信頼するか聞かれるのでyesを入力し、その後、同じくメールで届いたUsername/Passwordを入力します。
「Connected as xx.xx.xx.xx, using SSL」と表示されれば接続成功です。

[user@localhost ~]$ sudo openconnect https://(予約時にメールで届いたLab Network Address)
POST https://xxxxxxxxxx.cisco.com:xxxxx/
Connected to xx.xx.xx.xx:xxxxx
SSL negotiation with xxxxxxxxxx.cisco.com
Server certificate verify failed: signer not found

Certificate from VPN server "xxxxxxxxxx.cisco.com" failed verification.
Reason: signer not found
To trust this server in future, perhaps add this to your command line:
    --servercert sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Enter 'yes' to accept, 'no' to abort; anything else to view: (yesを選択)
Connected to HTTPS on xxxxxxxxxx.cisco.com
XML POST enabled
GROUP: [Anyconnect-pod223]:Anyconnect-pod223
POST https://xxxxxxxxxx.cisco.com:xxxxx/
XML POST enabled
Username:(予約時にメールで届いたUsername)
Password:(予約時にメールで届いたPassword)
POST https://xxxxxxxxxx.cisco.com:xxxxx/
Got CONNECT response: HTTP/1.1 200 OK
CSTP connected. DPD 60, Keepalive 300
Set up DTLS failed; using SSL instead
Connected as xx.xx.xx.xx, using SSL

参考させて頂いたURL

Cisco AnyConnect VPN CentOS 7 Server GUI with KDE

17
14
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
17
14