SIP電話機のOpenVPN使用方法と証明書生成説明

モジュール紹介

概要

仮想プライベートネットワーク VPN(virtual private network)は、公共ネットワーク上に構築される安全なネットワーク接続です。通常のネットワーク接続と異なり、専用のトンネルプロトコルを使用して、データの暗号化、完全性検査、ユーザー認証を実現します。これにより、送信中の情報が盗み見られたり、改ざんされたり、複製されたりすることを防ぎます。ネットワーク接続の安全性という観点では、公共ネットワーク上に専用線ネットワークを構築することに近いものです。ただし、この専用線は物理的なものではなく論理的なものなので、仮想プライベートネットワークと呼ばれます。VPNシステムは、VPNサーバー、VPNクライアント、トンネルで構成されます。Internetを利用した伝送は専用線を借りるよりも非常に低コストであるため、VPNにより企業はInternet経由で安全かつ経済的にプライベートな機密情報を伝送できます。
ここでは、OpenVPNを使用したVPN設定について説明します。OpenVPNはオープンソースのサードパーティ製仮想プライベートネットワーク設定ツールであり、既存設備を利用してVPNアプリケーションゲートウェイを構築できます。

サーバーのインストールと設定

OpenVPNはオープンソースのサードパーティ製仮想プライベートネットワーク設定ツールであり、既存設備を利用してVPNアプリケーションゲートウェイを構築できます。以下では、UbuntuとWindowsオペレーティングシステムでのサーバーの導入と設定をそれぞれ説明します。

UbuntuでOpenVPNサーバーを構築する

2.1.1 OpenVPNサーバーのインストール
Ubuntuで以下のコマンドを入力します:
sudo apt-get -y install openvpn libssl-dev openssl
sudo apt-get -y install easy-rsa
2.1.2 証明書の作成
以下の手順でコマンドを実行し、OpenVPNが正常に動作するために必要な証明書初期化設定を生成します:
sudo mkdir /etc/openvpn/easy-rsa/
sudo cp -r /usr/share/easy-rsa/* /etc/openvpn/easy-rsa/
sudo su
sudo vi /etc/openvpn/easy-rsa/vars
----->必要に応じて証明書設定を以下のように変更できます:
export KEY_COUNTRY=”CN”
export KEY_PROVINCE=”BJ”
export KEY_CITY=”BeiJing”
export KEY_ORG=”fanvil”
export KEY_EMAIL=”fanvil@fanvil.com”
export KEY_OU=”fanvil”
export KEY_NAME=”server”
varsを実行:    source vars
初回実行の場合はすべてクリア:    ./clean-all
CA証明書を生成:    ./build-ca
サーバー証明書を生成:    ./build-key-server server
クライアント証明書を生成:    ./build-key client
動的鍵ライブラリを生成:    ./build-dh

サーバーの起動

サーバー環境を設定し、対応する証明書設定ファイルを指定ディレクトリに配置します:
cp keys/ca.crt /etc/openvpn/
cp keys/server.crt keys/server.key keys/dh2048.pem /etc/openvpn
mv /etc/openvpn/dh2048.pem /etc/openvpn/dh1024.pem
cp keys/client.key keys/client.crt   /etc/openvpn/
cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/
cd /etc/openvpn
gzip -d server.conf.gz
cp /usr/share/doc/openvpn/examples/sample-config-files/client.conf /etc/openvpn/
サーバーを起動:
/etc/init.d/openvpn restart

WindowsでOpenVPNサーバーを構築する

2.3.1 OpenVPNサーバーのインストール
インターネットでWindows版OpenVPNソフトウェアを検索してダウンロードします。本構築ではOpenVPN GUIを使用します。ダウンロードしたソフトウェアをダブルクリックし、デフォルト設定でインストールします。easy-rsaコンポーネントのインストールにチェックを入れることに注意してください。デフォルトパスは C:\Program Files\OpenVPN です。
2.3.2 証明書の作成
操作を行う前に、まず初期化作業を行います:
自身の環境に合わせて C:\Program Files\OPENVPN\easy-rsa\vars.bat.sample の以下部分を変更してください:
set HOME=C:\Program Files\OPENVPN\easy-rsa
set KEY_COUNTRY=CN    #(国)
set KEY_PROVINCE=BEIJING    #(省・地域)
set KEY_CITY= BEIJING    #(都市)
set KEY_ORG=WINLINE    #(組織)
set KEY_EMAIL=admin@winline.com.cn    #(メールアドレス)
上記の#で始まる部分はコメントです。ファイルに書き込まないでください。
管理者権限でcmdを開いてDOSに入り、以下のコマンドを実行して
openvpn\easy-rsa ディレクトリに入ります:
        init-config
        vars
        clean-all
ルート証明書を生成:    build-ca(デフォルト設定で生成する場合は最後までEnterを押します)
動的鍵ライブラリを生成:    build-dh
サーバー証明書を生成:    build-key-server server(デフォルト設定で生成する場合は最後までEnterを押します)
クライアント証明書を生成:    build-key client(デフォルト設定で生成する場合は最後までEnterを押します)
2.3.3 サーバーの起動
生成された鍵はすべて OpenVPN\easy-rsa\keys ディレクトリに保存されます。
生成された証明書を OpenVPN\config ディレクトリにコピーします。
OpenVPN\sample-config 配下のサーバー設定ファイルを OpenVPN\config ディレクトリにコピーし、OpenVPNアプリケーションを起動します。

サーバー側設定

OpenVPNのインストールディレクトリで、notepad++を使用して server.ovpn または server.conf ファイルを開きます。サーバー側ファイルの例は以下のとおりです:
port 1194 # このポートはIANAがOpenVPN用に割り当てた指定ポートで、必要に応じて変更できます
proto udp # tcpも選択できます
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0 # 仮想LANセグメント設定。必要に応じて変更してください
ifconfig-pool-persist ipp.txt
keepalive 10 120
client-to-client
comp-lzo
max-clients 100
persist-key
persist-tun
status openvpn-status.log
verb 3
より詳しい説明はOpenVPN Wikiを参照してください。

クライアントの使用と設定

クライアント設定

ここでのクライアントは、OpenVPNをサポートするデバイスを指します。電話機をOpenVPNサーバーに接続するには、証明書ファイルが必要です。
まず、クライアント設定ファイル client.ovpn または client.conf を編集します。クライアント設定ファイルの例は以下のとおりです:
client
dev tun
proto udp
remote 192.168.1.135 1194 # サーバードメイン/IPとポート
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key comp-lzo
verb 3
サーバー側設定に合わせて関連項目を変更できます。
次に、事前に作成したクライアントファイル ca.crt、client.crt、client.key をエクスポートし、電話機のアップグレード時に使用します。

電話機でOpenVPNを使用する

電話機のWebページにログインし、順に ネットワーク->VPN をクリックします。OpenVPNファイル欄で client.ovpn、client.key、client.crt、ca.crt を一つずつアップロードします。アップロード完了後、OpenVPNファイル欄にはアップロードされた証明書ファイルのサイズが表示されます。以下のようになります:
OpenVPNファイルのアップロードVPN設定ページを開き、VPNモードで Open VPN を選択し、同時にVPNを有効にして、送信 ボタンをクリックします。サーバーに正常に接続されると、VPNページのVPNオンライン状態欄に取得したIPアドレスが表示されます。下図では、取得したIPは10.8.0.10です。
VPN設定画面を開く

VPN NATを有効にする

VPN NAT有効化画面
使用方法:
電話機にVPN証明書をインポートし、Enable VPN と Enable NAT を有効にします。PCを電話機のLANポートに接続します。このとき、PCのゲートウェイは電話機のIPに設定する必要があります。するとPCは電話機のVPNにアクセスできます。
PC ping10.8.0.10 はpingが通り、ping www.baidu.com もpingが通ります。10.8.0.10はVPNのIPアドレスです。
注:現在サポートしている機種は J3G/X3U/X3SG/J1P および X5S/X6/X7/X7C/X210/X210i です。電話機X3S/X4/X7は現在サポートしていません。

カタログ
顧客サービス 電話
We use cookie to improve your online experience. By continuing to browse this website, you agree to our use of cookie.

Cookies

This Cookie Policy explains how we use cookies and similar technologies when you access or use our website and related services. Please read this Policy together with our Terms and Conditions and Privacy Policy so that you understand how we collect, use, and protect information.

By continuing to access or use our Services, you acknowledge that cookies and similar technologies may be used as described in this Policy, subject to applicable law and your available choices.

Updates to This Cookie Policy

We may revise this Cookie Policy from time to time to reflect changes in legal requirements, technology, or our business practices. When we make updates, the revised version will be posted on this page and will become effective from the date of publication unless otherwise required by law.

Where required, we will provide additional notice or request your consent before applying material changes that affect your rights or choices.

What Are Cookies?

Cookies are small text files placed on your device when you visit a website or interact with certain online content. They help websites recognize your browser or device, remember your preferences, support essential functionality, and improve the overall user experience.

In this Cookie Policy, the term “cookies” also includes similar technologies such as pixels, tags, web beacons, and other tracking tools that perform comparable functions.

Why We Use Cookies

We use cookies to help our website function properly, remember user preferences, enhance website performance, understand how visitors interact with our pages, and support security, analytics, and marketing activities where permitted by law.

We use cookies to keep our website functional, secure, efficient, and more relevant to your browsing experience.

Categories of Cookies We Use

Strictly Necessary Cookies

These cookies are essential for the operation of the website and cannot be disabled in our systems where they are required to provide the service you request. They are typically set in response to actions such as setting privacy preferences, signing in, or submitting forms.

Without these cookies, certain parts of the website may not function correctly.

Functional Cookies

Functional cookies enable enhanced features and personalization, such as remembering your preferences, language settings, or previously selected options. These cookies may be set by us or by third-party providers whose services are integrated into our website.

If you disable these cookies, some services or features may not work as intended.

Performance and Analytics Cookies

These cookies help us understand how visitors use our website by collecting information such as traffic sources, page visits, navigation behavior, and general interaction patterns. In many cases, this information is aggregated and does not directly identify individual users.

We use this information to improve website performance, usability, and content relevance.

Targeting and Advertising Cookies

These cookies may be placed by our advertising or marketing partners to help deliver more relevant ads and measure the effectiveness of campaigns. They may use information about your browsing activity across different websites and services to build a profile of your interests.

These cookies generally do not store directly identifying personal information, but they may identify your browser or device.

First-Party and Third-Party Cookies

Some cookies are set directly by our website and are referred to as first-party cookies. Other cookies are set by third-party services, such as analytics providers, embedded content providers, or advertising partners, and are referred to as third-party cookies.

Third-party providers may use their own cookies in accordance with their own privacy and cookie policies.

Information Collected Through Cookies

Depending on the type of cookie used, the information collected may include browser type, device type, IP address, referring website, pages viewed, time spent on pages, clickstream behavior, and general usage patterns.

This information helps us maintain the website, improve performance, enhance security, and provide a better user experience.

Your Cookie Choices

You can control or disable cookies through your browser settings and, where available, through our cookie consent or preference management tools. Depending on your location, you may also have the right to accept or reject certain categories of cookies, especially those used for analytics, personalization, or advertising purposes.

Please note that blocking or deleting certain cookies may affect the availability, functionality, or performance of some parts of the website.

Restricting cookies may limit certain features and reduce the quality of your experience on the website.

Cookies in Mobile Applications

Where our mobile applications use cookie-like technologies, they are generally limited to those required for core functionality, security, and service delivery. Disabling these essential technologies may affect the normal operation of the application.

We do not use essential mobile application cookies to store unnecessary personal information.

How to Manage Cookies

Most web browsers allow you to manage cookies through browser settings. You can usually choose to block, delete, or receive alerts before cookies are stored. Because browser controls vary, please refer to your browser provider’s support documentation for details on how to manage cookie settings.

Contact Us

If you have any questions about this Cookie Policy or our use of cookies and similar technologies, please contact us at support@becke.cc .