TLSエクスポート用キーの生成方法
- Last Updated: April 5, 2026
- 8 minute read
- Flowmon Products
- Flowmon
- Documentation
はじめに
このガイドでは、Flowmonプローブによって生成されたフローの暗号化(TLS)エクスポート、またはTCP接続を介したFlowmonコレクタ間の暗号化フロー転送に必要なキーとルート認証局の生成方法について説明します。
キーと証明書を生成するには、Flowmonアプライアンスまたはその他のLinuxまたはWindowsバージョンにすでにインストールされているOpenSSLライブラリを使用することができます。
キーの生成
TCP/TLSの場合は、フローエクスポートデバイス(プローブ)とコレクタ用にキーと証明書のセットを生成する必要があります。すべての証明書に、同じ認証局(CA)による署名が必要です。TCP/TLSプロトコルを使用する各設定には、キーと証明書とともに、署名付きの証明書(CA証明書)を提供する必要があります。CA証明書は、エクスポータとコレクタが正当であることを保証するために使用されます。
CAルート証明書
会社にまだCAがない場合、以下の手順でプライベートキーと証明書を生成することができます。
複数のルート証明書を使用することはできません。一度に有効なのは1つのルート証明書だけです。
1. 以下のコマンドを使ってCAプライベートキーを生成します。
openssl genrsa -out rootCA.key 2048
2. CA用の自己署名証明書を生成します。
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem
これにより証明書の生成プロセスが開始され、証明書に記載したい詳細を指定する必要があります。生成プロセス中に、設定が表示され、入力できます。
You are about to be asked to enter information that will be incorporated into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CZ
State or Province Name (full name) [Some-State]:n/a
Locality Name (eg, city) []:Brno
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Flowmon Networks, a.s.
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:flowmon.com
Email Address []:support@flowmon.com
エクスポータ/コレクタの証明書を作成する
次に、各エクスポータとコレクタについて、作成したCA証明書(または社内で使用されている証明書)で署名された証明書を作成する必要があります。
「exporter」というキーワードは必要に応じて置き換えることができます。
1. まず、プライベートキーを生成します。
openssl genrsa -out exporter.key 2048
パスワードで保護されたキーは使用できません。
2. 次に、証明書署名要求を作成します。
openssl req -new -key exporter.key -out exporter.csr
認証局の証明書を生成したときと同様にさまざまな質問が再び表示されます。正確に答える必要がある重要な質問がコモンネームで、アプライアンスのIPアドレスまたはドメイン名を指定します。
You are about to be asked to enter information that will be incorporated into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CZ
State or Province Name (full name) [Some-State]:n/a
Locality Name (eg, city) []:Brno
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Flowmon Networks, a.s.
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:127.0.0.1
Email Address []:support@flowmon.com
Please enter the following 'extra' attributes to be sent with your certificate request
A challenge password []:
An optional company name []:
3. X.509の拡張子を追加する設定ファイルを作成します。
cat > exporter.v3.ext << EOF
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
EOF
4. 最後に、CA証明書とキーを使って署名します。
openssl x509 -req -in exporter.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out exporter.crt -days 1024 -sha256 -extfile exporter.v3.ext
コマンド出力:
Signature ok subject=/C=CZ/ST=n/a/L=Brno/O=Flowmon Networks, a.s./OU=IT/CN=127.0.0.1/emailAddress=support@flowmon.com Getting CA Private Key
設定に証明書を使用する
暗号化フローのエクスポートまたは転送を使用するインフラストラクチャ内のすべてのプローブとコレクタについて、前の手順を繰り返します。ルート認証局とすべてのデバイスの証明書を生成したら、デバイスにアップロードして暗号化フローのエクスポートまたは転送を設定できます。
まず、TLS経由のTCP接続を受け入れるようにコレクタを設定します。これを行うには、[Configuration Center] → [FMC設定] → [リスニングポート]でリスニングポートを編集します。
前の手順で作成した証明書とプライベートキーファイルをアップロードします。
- CA証明書 - rootCA.pem
- 証明書 - exporter.crt
- プライベートキー - exporter.key
次に、その証明書を使用するようにプローブのモニタリングポートを設定します。これを行うには、[Configuration Center] → [モニタリングポート]でターゲットを編集します。
証明書とプライベートキーファイルをアップロードします。
- CA証明書 - rootCA.pem
- 証明書 - exporter.crt
- プライベートキー - exporter.key