OpenVPN on Amazon EC2 (Ubuntu10.04) Windowsクライアント編
■前提条件
サーバー編で作成した鍵(client01.crt, client01.key, ca.crt)がクライアントマシンにあること
■OpenVPNクライアントをダウンロード、インストール
http://openvpn.net/index.php/download.html
■クライアント鍵(.crt, .key)、サーバーCA公開鍵(ca.crt)を配置
「C:\Program Files\OpenVPN\config」にコピー。
■設定ファイルをコピー
「C:\Program Files\OpenVPN\sample-config\client.ovpn」を
「C:\Program Files\OpenVPN\config」にコピー。
■設定ファイルを編集(「xxx.xxx.xxx.xxx」はEC2(OpenVPNサーバー)に割り当てたElasticIP)
サーバー情報を変更
変更前
# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
remote my-server-1 1194変更後
# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
remote xxx.xxx.xxx.xxx 1194
鍵情報を変更
変更前
# SSL/TLS parms.
# See the server config file for more
# description. It's best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca ca.crt
cert client.crt
key client.key変更後
# SSL/TLS parms.
# See the server config file for more
# description. It's best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\client01.crt"
key "C:\\Program Files\\OpenVPN\\config\\client01.key"
■クライアント起動
「C:\Program Files\OpenVPN\config\\client.ovpn」を右クリックして、
「Start OpenVPN on this config file」をクリック。
※もしくはGUIで起動(デスクトップにショートカットがあるはず)
パスフレーズを聞かれるので、クライアント鍵作成時に入力したものを入力後、クライアント起動されればOK
最後に
Fri Mar 30 14:14:15 2012 Initialization Sequence Completed