ADC

事前設定チェックツール

注:

NSPEPIの最新バージョンと事前設定チェックツールは、公開されているGitHubからダウンロードできます。 ツールをダウンロードする方法については、「 [GitHub NEPEPI」と「GitHub](https://github.com/citrix/ADC-scripts/tree/master/nspepi) の事前設定」を参照してください。 最も完全で最新のバージョンには、最新バージョンのツールを使用することをお勧めします。

事前構成チェックツールは、NetScalerリリース12.1から使用できます。このツールを使用して、無効な、削除された機能、または廃止された機能がどの機能構成でもまだ使用されているかどうかを確認できます。このツールは、NetScalerリリース13.1から削除または廃止されたパラメーターまたはコマンドが構成ファイルに含まれているかどうかを検証します。このツールは、保存された構成からの構成ファイルのみを検証します(たとえば ns.conf)。

検証結果に、削除または無効なコマンドの使用状況が表示される場合は、アプライアンスをアップグレードする前に、まず構成をNetScalerが推奨する代替手段に変更する必要があります。

また、このツールは、クラシック表現をサポートしなくなった機能設定内のクラシックポリシー表現もチェックします。nspepiツールを使用して、クラシック構成を詳細構成に変換できます。実行が成功すると、ツールは 2 つのファイルを生成します。1 つは無効なコマンド用で、もう 1 つは廃止されたパラメーターまたはコマンド用です。無効なコマンドを含むファイルは、入力ファイルと同じ名前ですが、プレフィックスは「issues_」です。非推奨のコマンドを含むファイルには、「deprecated_」というプレフィックスが付いています。

このツールは以下を検証します。

  1. コンテンツスイッチング、キャッシュリダイレクト、AppFW、SSL、および CMP 機能の従来のポリシー式。
  2. フィルタ機能 (コンテンツフィルタとも呼ばれます)-アクション、ポリシー、およびバインディング。
  3. HTTPプロファイルでSPDY、Sure Connect(SC)、プライオリティキューイング(PQ)、HTTPサービス拒否(DoS)、HTMLインジェクションの機能がある。
  4. 負荷分散永続性ルールのクラシック式。
  5. 書き換えアクションの「パターン」および「BypassSafetyCheck」パラメータ。
  6. 「patclass」設定エンティティ。
  7. 高度な定義式で引数なしの「HTTP.REQ.BODY」。
  8. 高度な定義式の Q および S プレフィックス。
  9. cmp パラメータ設定用の「policyType」パラメータ。
  10. 非推奨のコマンドとパラメータ。

UNIX シェルで事前再検証ツールを実行する

コマンドプロンプトで入力します。

check_invalid_config <config_file> -buildVersion <build version>
<!--NeedCopy-->

コマンド構文では、

  • <config file>はNetScaler構成ファイルを参照します。ファイルは、ns.confなどの保存済み設定から取得する必要があります。
  • <build version>は廃止されたコマンドと削除されたコマンドを知りたいビルドを指します。ビルドバージョンが指定されていない場合、ツールはデフォルトでNetScalerリリース13.1で廃止されたコマンドと削除されたコマンドを検出します。

例:

root@ns# check_invalid_config /nsconfig/ns.conf 13.1

無効なコマンドを含むサンプル出力

次に、無効なコマンドを含む設定ファイルの出力例を示します。

root@ns# check_invalid_config sample_conf_1.conf

The following configuration lines will get errors in 13.1 and both they and dependent configuration will be removed from the configuration:
add cmp policy cmp_pol -rule ns_true -resAction GZIP
add cs policy cs_pol_2 -rule ns_true
add cs policy cs_pol_3 -domain www.abc.com
add cs policy cs_pol_4 -url "/abc"
add rewrite action act_1 replace_all "http.req.body(1000)" http.req.url -pattern abcd
add rewrite action act_123 replace_all http.req.url ""aaaa"" -pattern abcd
add responder action ract respondwith "Q.URL + Q.HEADER("abcd")"
add appfw policy aff_pol_1 "http.req.body.length.gt(10)" APPFW_BYPASS
add appfw policy aff_pol ns_true APPFW_BYPASS

The nspepi upgrade tool can be useful in converting your configuration - see the documentation at https://docs.citrix.com/en-us/citrix-adc/current-release/appexpert/policies-and-expressions/introduction-to-policies-and-exp/converting-policy-expressions-nspepi-tool.html.

NOTE: the nspepi tool doesn't convert the following configurations:
        1. SureConnect commands
        2. PriorityQueuing commands
        3. HTTP Denial of Service Protection commands
        4. Classic SSL commands
        5. HTMLInjection commands.

NOTE: No deprecated commands detected in the configuration.

<!--NeedCopy-->

上記のエラーが発生した場合は、 nspepi アップグレードツールを使用して構成を変換するか、構成を手動で変換できます。詳細については、「 nspepi ツール」を参照してください。

注:

このnspepiツールは、NetScaler ADCバージョン12.1、13.0およびそれ以降のバージョンでのみ実行できます。

無効なコマンドや廃止されたコマンドを含むサンプル出力

以下は、無効なコマンドと廃止されたコマンドの両方を含む設定ファイルの出力例です。

root@ns# check_invalid_config sample_conf_2.conf

The following configuration lines will get errors in 13.1 and both they and dependent configuration will be removed from the configuration:
add cmp policy cmp_pol -rule ns_true -resAction GZIP
add cs policy cs_pol_2 -rule ns_true
add cs policy cs_pol_3 -domain www.abc.com
add cs policy cs_pol_4 -url "/abc"
add rewrite action act_1 replace_all "http.req.body(1000)" http.req.url -pattern abcd
add rewrite action act_123 replace_all http.req.url ""aaaa"" -pattern abcd
add responder action ract respondwith "Q.URL + Q.HEADER("abcd")"
add appfw policy aff_pol_1 "http.req.body.length.gt(10)" APPFW_BYPASS
add appfw policy aff_pol ns_true APPFW_BYPASS

The nspepi upgrade tool can be useful in converting your configuration - see the documentation at https://docs.citrix.com/en-us/citrix-adc/current-release/appexpert/policies-and-expressions/introduction-to-policies-and-exp/converting-policy-expressions-nspepi-tool.html.

NOTE: the nspepi tool doesn't convert the following configurations:
        1. SureConnect commands
        2. PriorityQueuing commands
        3. HTTP Denial of Service Protection commands
        4. Classic SSL commands
        5. HTMLInjection commands.

NOTE: some deprecated commands have also been detected in the config file, please check ./deprecated_sample_conf_2.conf file for the deprecated commands.
<!--NeedCopy-->

無効なコマンドはないが、廃止されたコマンドを含むサンプル出力

以下は、廃止予定のコマンドはあるが無効なコマンドはない設定の出力例です。

root@ns# check_invalid_config sample_conf_3.conf

The following configuration lines have been deprecated in 13.1 and will be removed in future releases:
[add authentication localPolicy lpol ns_true] command has been deprecated, please use the advanced authentication policy command
[add authentication certPolicy auth_pol_1 ns_true auth_act] command has been deprecated, please use the advanced authentication policy command
[add authentication negotiatePolicy auth_pol_2 ns_true auth_act] command has been deprecated, please use the advanced authentication policy command
[add authentication tacacsPolicy auth_pol_3 ns_true auth_act] command has been deprecated, please use the advanced authentication policy command
[add authentication samlPolicy auth_pol_4 ns_true auth_act] command has been deprecated, please use the advanced authentication policy command
[add authentication radiusPolicy auth_pol_5 ns_true auth_act] command has been deprecated, please use the advanced authentication policy command
[add authentication ldapPolicy auth_pol_6 ns_true auth_act] command has been deprecated, please use the advanced authentication policy command
[add authentication webAuthPolicy auth_pol_1 -rule ns_true -action auth_act] command has been deprecated, please use the advanced authentication policy command
[add authentication dfaPolicy auth_pol_1 -rule ns_true -action auth_act] command has been deprecated, please use the advanced authentication policy command

For the complete deprecated commands, please see the output of ./deprecated_sample_conf_3.conf file.

No invalid config detected with the configuration.

<!--NeedCopy-->

検証エラーや警告のないサンプル出力

以下は、無効な、削除されたコマンド、または廃止されたコマンドを含まない構成ファイルの出力例です。

root@ns# check_invalid_config /var/tmp/new_ns.conf  
No invalid or deprecated config detected with the configuration.
<!--NeedCopy-->
事前設定チェックツール