この製品のマニュアルセットは、偏向のない言語を使用するように配慮されています。このマニュアルセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザーインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブランゲージに対する取り組みの詳細は、こちらをご覧ください。
このドキュメントは、米国シスコ発行ドキュメントの参考和訳です。リンク情報につきましては、日本語版掲載時点で、英語版にアップデートがあり、リンク先のページが移動/変更されている場合がありますことをご了承ください。あくまでも参考和訳となりますので、正式な内容については米国サイトのドキュメントを参照ください。
この章では、Cisco Application Control Engine(ACE)モジュールのアプリケーション プロトコル インスペクションの設定方法について説明します。アプリケーション プロトコル インスペクションは、アプリケーション ペイロードでレイヤ 3 およびレイヤ 4 情報を伝送するプロトコル、何らかのディープ パケット インスペクションを必要とする HTTP プロトコル、FTP(ファイル転送プロトコル)要求コマンド フィルタリングを必要とするプロトコルなどに対応した機能を提供します。
• アプリケーション プロトコル インスペクション コンフィギュレーションのクイック スタート手順
• レイヤ 7 FTP コマンド インスペクション ポリシーの設定
• レイヤ 7 HTTP ディープ インスペクション ポリシーの設定
• レイヤ 3 およびレイヤ 4 アプリケーション プロトコル インスペクションのトラフィック ポリシーの設定
アプリケーションのなかには、ACE をパケットが通過する際にパケットのデータ部分に特別な処理を必要とするものがあります。アプリケーション プロトコル インスペクションを使用すると、ACE を通過するプロトコルの動作の確認や、不要なトラフィックや悪意のあるトラフィックの識別が可能です。ACE は、トラフィック ポリシーの規定に基づいてパケットの受け入れや拒否を行い、アプリケーションやサーバを安全に使用できるようにします。
ここでは、アプリケーション プロトコル インスペクションに関する次の内容について説明します。
アプリケーション プロトコル インスペクションを実行するには、ACE の設定を行います。アプリケーション プロトコル インスペクションは、次の処理を行うアプリケーションのアプリケーション プロトコル「フィックスアップ(検査)」と呼ばれることがあります。
• データ ペイロードが含まれたデータ パケットに IP アドレス指定情報を埋め込む
• ダイナミックに割り当てられたポート上でセカンダリ チャネルを開く
パケットを宛先サーバに渡す前に、ACE での最初のステップとして ドメイン ネーム システム(DNS)、ファイル転送プロトコル(FTP)、HTTP、インターネット制御メッセージ プロトコル(ICMP)、インターネットロケータサービス(ILS)、Real-Time Streaming Protocol(RTSP)、Cisco Skinny Client Control Protocol(SCCP)、および Session Initiation Protocol(SIP)の各プロトコルのアプリケーション インスペクションを実行する必要があります。HTTP プロトコルの場合、ACE はディープ パケット インスペクションを実行して、HTTP プロトコルのステートフル監視を行い、ユーザ定義のトラフィック ポリシーに基づいてトラフィックを許可または拒否します。HTTP ディープ パケット インスペクションでは、HTTP ヘッダー、URL、ペイロードなどの HTTP の属性が主要な処理対象です。FTP プロトコルの場合、ACE は FTP セッションの FTP コマンド インスペクションを実行し、特定のコマンドを制限することを可能にします。
アプリケーション インスペクションを使用すると、TCP/UDP フロー内に埋め込まれた IP アドレス指定情報の位置が特定できます。ACE はこの機能により、埋め込まれた IP アドレスを変換し、変換によって影響を受けるチェックサムなどのフィールドの情報を更新します。
プロトコルのペイロードに埋め込まれた IP アドレスの変換処理は、Network Address Translation(NAT; ネットワーク アドレス変換)(ユーザによる明示的な変更)およびサーバ ロード バランシング(暗黙的な NAT)にとって欠かせない機能です。
アプリケーション インスペクションでは TCP/UDP セッションも監視して、セカンダリ チャネルのポート番号を判別します。プロトコルのなかには、パフォーマンスを向上させるためにセカンダリの TCP ポートまたは UDP ポートを開くものがあります。最初のセッションでは Well-known ポートが使用され、ダイナミックに割り当てるポート番号のネゴシエーションが行われます。アプリケーション プロトコル インスペクション機能では、これらのセッションを監視し、ダイナミックなポートの割り当てを識別し、セッションの継続中にこれらのポート上で行われるデータの交換を許可します。
表3-1 に、ACE でサポートされるアプリケーション インスペクション プロトコルおよびデフォルトの TCP/UDP プロトコルとポート、ならびに各プロトコルが NAT および Port Address Translation(PAT; ポート アドレス変換)と互換性があるかどうかを示します。
プロトコル |
|
|
|
|
|
|
---|---|---|---|---|---|---|
ポート 53 宛ての DNS パケットを検査します。検査対象の DNS パケットの最大長を指定できます。詳細については、「DNS インスペクション」を参照してください。 |
||||||
FTP パケットを検査し、ペイロードに埋め込まれたアドレスとポートを変換し、データのセカンダリ チャネルを開きます。詳細については、「FTP インスペクション」を参照してください。 |
||||||
inspect ftp strict コマンドを使用すると、ACE による各 FTP コマンド/応答シーケンスの追跡が可能になります。また FTP サーバ上で使用されている有効なユーザ名を、FTP クライアントから確認できないようにすることもできます。詳細については、「FTP インスペクション」を参照してください。 |
||||||
HTTP パケットを検査します。詳細については、「HTTP ディープ パケット インスペクション」を参照してください。 |
||||||
詳細については、「ICMP インスペクション」を参照してください。 |
||||||
error キーワードは、ICMP エラー メッセージの NAT をサポートします。ACE は ICMP エラー インスペクションがイネーブルにされると、NAT の設定に基づいて、ICMP エラー メッセージを送信する中間ホップ用の変換セッションを作成します。ACE は変換した IP アドレスでパケットを上書きします。詳細については、「ICMP インスペクション」を参照してください。 |
||||||
RTSP パケットを検査し、NAT の規則に従ってペイロードを変換します。ACE は音声用とビデオ用にセカンダリ チャネルを開きます。RFC に規定されているすべての RTSP 形式(パケット タイプ)がサポートされているわけではありません。詳細については、「RTSP インスペクション」を参照してください。 |
||||||
1.ACE はこれらの規格に準拠していますが、検査中のパケットに対する準拠性の適用は行いません。たとえば、FTP コマンドは順番が揃うことになっていますが、ACE はこの順番の適用を行いません。 |
アプリケーション プロトコル インスペクションの規則は、クラス マップ、ポリシー マップ、およびサービス ポリシーを使用して設定します。アプリケーション プロトコル インスペクションを設定する際の、それぞれの機能の役割について次にまとめます。
• レイヤ 7 クラス マップ ― レイヤ 7 ネットワーク トラフィックを分類して、プロトコル インスペクションの属性(HTTP ヘッダー、URL など)および FTP 要求コマンドを識別します。
• レイヤ 7 ポリシー マップ ― レイヤ 7 クラス マップに定義した分類と一致するネットワーク トラフィック上で ACE が実行するステートメントとアクションを設定します。
• レイヤ 3 およびレイヤ 4 クラス マップ ― ACE を通過するネットワーク トラフィックをアプリケーション インスペクション対象に分類し、ポリシー マップに指定された inspect コマンドに関連付けられているトラフィックと対照します。
• レイヤ 3 およびレイヤ 4 ポリシー マップ ― クラス マップに示された基準と一致するトラフィックの分類に対応する DNS、FTP、 HTTP、ICMP、ILS、RTSP、SCCP、SIP プロトコル インスペクションおよび FTP コマンド インスペクションをイネーブルにします。
• サービス ポリシー ― ポリシー マップをアクティブにし、トラフィック ポリシーを 1 つの VLAN インターフェイスに付加するか、グローバルにすべての VLAN インターフェイスに付加します。
図3-1 に、アプリケーション プロトコル インスペクションの実行に必要なクラス マップおよびポリシー マップの設定手順について概要を示します。このフロー チャートには、ACE によるクラス マップとポリシー マップ コンフィギュレーションの各種要素間の関連付けも示されています。
図3-1 アプリケーション プロトコル インスペクションの設定フロー図
Domain Name System(DNS; ドメイン ネーム システム)インスペクションでは、次のタスクが実行されます。
• メッセージの交換を監視して、DNS 応答の ID と DNS クエリーの ID が一致していることを確認します。
• UDP 接続の各 DNS クエリーに対して 1 つの DNS 応答を許可します。ACE は DNS 応答が転送されると、その DNS クエリーに関連付けられている DNS セッションをただちに削除します。
• DNS A レコードを NAT の設定に基づいて変換します。NAT を使用して変換されるのは転送ルックアップだけです。ACE はポインタ(PRT)レコードを扱いません。
(注) DNS リライト機能は PAT に適用できません。その理由は A レコードごとに複数の PAT 規則が適用されることによります。複数の PAT 規則が使用されると、ACE は適切な PAT 規則を適正に選択することが困難になります。
• 最大 DNS パケット長のチェックを行って、DNS 応答の最大長が inspect dns コマンドで指定された値を超えていないことを確認します。
(注) オプションの maximum-length キーワードを指定しないで inspect dns コマンドを入力した場合、ACE は DNS のパケット サイズをチェックしません。
–ラベルの最大長が 63 バイトを超えていないことを確認します。
–ドメイン名の最大長が 255 バイトを超えていないことを確認します。
同じ 2 つのホスト間に複数の DNS セッションが生成され、それらのセッションの 5 つのタプル(発信元/宛先 IP アドレス、発信元/宛先ポート、およびプロトコル)が同じ場合、それらのセッションに対しては接続が 1 つだけ作成されます。DNS の識別情報は、 app_id によって追跡され、各 app_id のアイドル タイマーはそれぞれ独立に動作します。
app_id の有効期限は独立して満了するため、正規の DNS 応答が ACE を通過できるのは限定された時間内だけであり、リソースの生成はありません。ただし、 show conn コマンドを入力した場合には、DNS 接続のアイドル タイマーが新しい DNS セッションによってリセットされることが表示されます。このリセット動作は共有 DNS 接続に起因しています。
FTP インスペクションでは、FTP セッションを対象にメッセージ内のアドレス変換、ポートのダイナミックなオープン、および要求/応答メッセージのステートフル トラッキングについて検査します。指定された各 FTP コマンドに確認応答が得られなければ、ACE は新しいコマンドを許可しません。コマンド フィルタリングでは、ACE により特定のコマンドを制限できます。ACE はコマンドを拒否した場合、その接続を終了します。
ACE は FTP コマンド インスペクション プロセスを次のように実行します。
• ダイナミックなセカンダリ データ接続の準備を行います。各チャネルは、ファイルのアップロード、ファイルのダウンロード、またはディレクトリ リスト イベントに応答して割り当てられ、事前にネゴシエーションが必要です。ポートは PORT または PASV コマンドによってネゴシエーションされます。
• FTP コマンド/応答シーケンスを追跡します。ACE はここに示すコマンド チェックを実行します。レイヤ 3 およびレイヤ 4 ポリシー マップの inspect ftp コマンドに strict キーワードを指定すると、ACE は次のような異常なアクティビティがないかどうか各 FTP コマンド/応答シーケンスを追跡します。特定の FTP コマンドを拒否したり、SYST コマンドに対するサーバ応答をマスクするには、レイヤ 7 FTP ポリシー マップで strict キーワードを使用します(レイヤ 3 およびレイヤ 4 ポリシー マップ内で階層化)。
(注) strict キーワードを使用した場合、RFC 規格に準拠していない FTP クライアントに影響を与えることがあります。
–不完全なコマンド ― PORT および PASV 応答コマンド内のカンマの数が 5 つかどうかをチェックします。5 つ以外の場合、ACE は PORT コマンドが不完全であると見なし警告メッセージを発行し、TCP 接続を終了します。
–不正なコマンド ― FTP コマンドが RFC 959 の規定に従って <CR><LF> 文字で終了しているかどうかをチェックします。異なる場合、ACE は接続を終了します。
–RETR コマンドと STOR コマンドのサイズ ― RETR および STOR コマンドのサイズが固定数の 256 であるかをチェックします。これを超えるサイズの場合、ACE はエラー メッセージをログに記録し接続を終了します。
–コマンド スプーフィング ― PORT コマンドが常にクライアントから送信されていることを確認します。PORT コマンドがサーバから送信されている場合、ACE は TCP 接続を拒否します。
–応答スプーフィング ― PASV 応答コマンド(227)が常にサーバから送信されることを確認します。PASV 応答コマンドがクライアントから送信される場合、ACE は TCP 接続を拒否します。この拒否により、ユーザが「227 xxxxx a1, a2, a3, a4, p1, p2」を実行した場合のセキュリティ ホールが防止されます。
–無効ポートのネゴシエーション ― ネゴシエーションされたダイナミック ポートの値が 1024 より大きいことを確認します(ポート番号の 2 ~ 1024 は Well-known ポート接続用に予約されています)。ネゴシエーションされたポートがこの範囲内の場合、ACE は TCP 接続を終了します。
–コマンドのパイプライン化 ― PORT および PASV 応答コマンド内のポート番号のあとに続く文字数が定数の 8 であるかをチェックします。文字数が 8 を超える場合、ACE は TCP 接続を終了します。
• 埋め込まれた IP アドレスを NAT で変換します。FTP コマンド インスペクションではアプリケーション ペイロード内の IP アドレスを変換します。詳細は RFC 959 を参照してください。
ACE は、HTTP プロトコルのステートフル ディープ パケット インスペクションを実行します。ディープ パケット インスペクションは、ACE がパケットまたはトラフィック ストリームのアプリケーション ペイロードを確認しデータのコンテンツに基づいて判別を行う点で、アプリケーション インスペクションの特別なケースになります。HTTP ディープ インスペクションでは、アプリケーション インスペクションの主な処理対象は HTTP ヘッダー、URL、ペイロード(範囲は限定)などの HTTP の属性です。ユーザが定義した正規表現もペイロード内の「署名」の検出に使用されます。
トラフィックの許可や拒否、クライアントへの TCP リセット メッセージの送信、サーバへの接続終了の送信を行うには、ポリシーを定義します。
HTTP アプリケーション インスペクションでサポートされるセキュリティ機能は、次のとおりです。
• RFC 準拠性モニタリングおよび RFC 方式フィルタリング
Internet Control Message Protocol(ICMP; インターネット制御メッセージ プロトコル)インスペクションでは、TCP および UDP トラフィックと同様の検査を行えるように、ICMP トラフィックに「セッション」を持たせることができます。ICMP インスペクションを使用しない場合は、ICMP トラフィックの ACE の通過を許可する ACL は作成しないようにしてください。ステートフル インスペクションが実行されない場合、ICMP がネットワークの攻撃に利用される可能性があります。ICMP インスペクションにより、各要求に対する応答が 1 つだけ存在し、シーケンス番号が正しいことを確認できます。
ステートフル ICMP の場合、ACL と NAT 機能を実行するだけでなく、TCP/UDP フローのステート情報がメンテナンスされるのと同じように ICMP のステート情報がメンテナンスされます。ICMP ステート情報をメンテナンスすることは、次の問題の解決のために必要です。
ICMP エラー メッセージは、宛先に送信されるパケットが転送できない場合に、宛先までのネットワーク パス上に存在する中間ノードによって生成されます。また、ポート到達不能エラーが発生した場合など、エンドポイント ノードによっても生成されます。ICMP エラー メッセージのデータ部には、エラーが発生したオリジナルのパケットが含まれています。また、エラー メッセージの外側のヘッダーには中間ノードまたはエンドポイント ノードのアドレスが、内側のヘッダーには宛先ノードのアドレスが含まれています。
ICMP エラー フィックスアップでは NAT の設定を使用して、ノード アドレスおよび宛先アドレスをグローバル アドレスに変換する処理を行います。ICMP エラー フィックスアップはユーザが設定できる機能です。この機能をイネーブルにしない場合、中間ノードとエンドポイント ノードのアドレスは埋め込まれたパケットの宛先アドレスと同じ方法で変換されます。その結果、エラー メッセージは宛先から送信されたように表示され、宛先に至るノード アドレスつまり経路は含まれません。
ICMP インスペクションでは、ICMP 要求メッセージまたは応答メッセージに対して次のタスクを実行します。
• 双方向セッション レコードまたは接続レコードを作成します。転送方向の検索キーは、発信元 IP アドレス、宛先 IP アドレス、プロトコル、ICMP タイプ、ICMP 識別子、および VLAN です。
• 接続レコードにシーケンス番号ウィンドウが含まれていることを確認します。このウィンドウには応答待ちになっている要求シーケンス番号のリストが指定されています。
• 接続レコードにタイムアウト値が含まれていることを確認します。タイムアウトによって、非アクティブな接続レコードを他のフローで再利用可能にし、不正な応答パケットからネットワークを保護できます。
• 有効な接続レコードが存在する場合にのみ応答パケットを許可し、接続レコード(またはステート情報)が存在する場合は応答パケットが ACL を再度通過することを防止します。
• ICMP 要求または応答の中継パケットの接続レコードを作成し、ACE に発着するパケットについても接続レコードを作成します。
ICMP エラー メッセージ インスペクションでは、次のタスクを実行します。
• ICMP エラー メッセージに埋め込まれた IP ヘッダーを抽出し、エラー メッセージが生成された埋め込みパケットに対応する接続レコードが存在しているかどうかをチェックします。
• 埋め込まれたパケットのセッションが存在するかどうかに関わらず、ICMP エラー メッセージの ACL を実行します。ICMP エラー メッセージ自体はステートレスであるため、アクセス コントロールが必要です。
• 中間ノードまたはエンドポイント ノードに NAT エントリ(xlate)を割り当てて、ICMP エラー メッセージのローカル IP アドレスとグローバル IP アドレスとの NAT 処理を実行します。
Internet Locator Service(ILS)は、あるユーザが別のユーザを検索する際に Microsoft NetMeeting により使用されます。ILS は、Lightweight Directory Access Protocol(LDAP)とのインターフェイスにより、ディレクトリ サービスを提供します。ACE インスペクション機能により、NetMeeting、Site Server、および ILS サーバとディレクトリ情報の交換を行う Active Directory 製品で NAT 機能がサポートされるようになります。LDAP データベースでは IP アドレスのみが保存され、ポートは対象外となるため、ACE では、ILS 対応 の PAT はサポートされません。
ILS/LDAP はクライアント/サーバ モデルに準拠し、個々のセッションで単一の TCP 接続を使用します。クライアントのアクションによっては複数のセッションが必要になることがあります。接続のセットアップの間に、クライアントはサーバに向けて BIND プロトコル データ ユニット(PDU)を送信します。クライアントがサーバから BIND RESPONSE を受け取ると、これ以外のメッセージ(たとえば ADD、DEL、SEARCH、または MODIFY)を交換して、ILS Directory 上で各種の操作を実行することができます。
ADD REQUEST および SEARCH REQUEST の PDU には、NetMeeting ピアのアドレスを格納することができます。NetMeeting 2.x および 3.x のバージョンでは ILS がサポートされます。
ILS トラフィックは UDP の二次チャネルでしか存在できないため、TCP の非アクティビティ時間が経過すると、ACE は TCP 接続を切断します。デフォルトにより、TCP の非アクティビティ時間は 60 分に設定されますが、接続パラメータ マップを使用してこれを調整することもできます。接続パラメータ マップの設定に関する詳細については、 第 4 章「TCP/IP 正規化パラメータおよび IP 再構成パラメータの設定」 を参照してください。
• 基本符号化規則(BER)デコーダ機能を使用して、
LDAP REQUEST/RESPONSE の各 PDU をデコードします。
• BER エンコード機能を使用して、変換したアドレスで PDU をエンコードします。
• 新たにエンコードした PDU を TCP パケットにコピーします。
• 増分 TCP チェックサムとシーケンス番号の調整を実行します。
Real Time Streaming Protocol(RTSP)は、RealAudio、RealNetworks、Apple QuickTime 4、RealPlayer、および Cisco IP/TV 接続で使用されます。RTSP アプリケーションでは、TCP および UDP で Well-known ポート 554 を制御チャネルとして使用します。ACE は RFC 2326 に準拠するために、TCP のみをサポートします。
TCP 制御チャネルでは、クライアントに設定されているトランスポート モードに応じて、音声およびビデオ トラフィックの送信に使用するデータ チャネルをネゴシエーションします。サポートされるデータ トランスポート モードは、rtp/avp、rtp/avp/udp、x-real-rdt、x-real-rdt/udp、および x-pn-tng/udp です。データ トランスポート タイプ rtp/avp/tcp と x-real-rdt/tcp では、制御チャネルを使用してデータのストリーミングが行われます。この場合、データ チャネルのセキュア ポート(ピンホール)を空けるのに RTSP インスペクションは必要ありません。
ACE は、ステータス コード 200 の SETUP 応答メッセージを解析します。
RFC 2326 には SETUP メッセージにクライアント ポートとサーバ ポートを含めることが規定されていないので、ACE はステートを追跡し、SETUP メッセージ内のクライアント ポートを記憶する必要があります。QuickTime では SETUP メッセージ内にクライアント ポートを含め、サーバはサーバ ポートのみを使用して応答します。
RTSP インスペクションが実行されている間、ACE は次のことを行いません。
• RealNetworks マルチキャスト モード(x-real-rdt/mcast)のサポート
• HTTP メッセージに RTSP メッセージが隠される HTTP クローキングを認識する機能のサポート
• RTSP メッセージでの NAT の実行。これは、埋め込まれた IP アドレスが HTTP または RTSP メッセージの一部として Session Description Protocol(SDP)ファイルに含まれていることによります。
ACE が実行する RTSP インスペクションでは、さらに次の制約が適用されます。
• Cisco IP/TV の場合、ACE がメッセージの SDP 部分で実行する変換の数は、Content Manager のプログラム リストの数に比例します(各プログラム リストは少なくとも 6 つの埋め込み IP アドレスを持つことができます)。
• RealPlayer を使用する場合、トランスポート モードを正しく設定する必要があります。ACE 側では、サーバからクライアントへの ACL 分類を追加します。RealPlayer 側では、 Tools > Preferences > Connection > Network Transport >
RTSP Settings の順にクリックしてトランスポート モードを変更します。
–RealPlayer で TCP モードを使用する場合は、 Attempt to use TCP for all content チェック ボックスをオンにします。ACE で RTSP アプリケーション インスペクションを設定するする必要はありません。
–RealPlayer で UDP モードを使用する場合は、 Attempt to use UDP for all content チェック ボックスをオンにします。ACE で RTSP アプリケーション インスペクションを設定します。
Skinny Client Control Protocol(SCCP)は、VoIP ネットワークで Cisco IP Phone や Cisco CallManager などとともに使用します。ACE では、SCCP 3.3.2 までの全バージョンがサポートされます。
SCCP インスペクションでは次の操作を行うことができます。
• 埋め込まれた IP アドレスとポートの NAT をサポートします。
• SCCPPrefix の長さがメッセージ ID の長さ(設定可能)に満たないメッセージをドロップします。
• メッセージ ID の長さ(設定できる最大長)を検証します。
• 登録済みクライアントだけが発呼できるようにします。この機能は設定可能です。デフォルトではディセーブルになっています。
Session Initiation Protocol(SIP)は、二者間カンファレンスなどの通話処理セッションに使用します。SIP は SDP と連携して通話処理を行います。
• SIP のテキストベース メッセージを変換し、メッセージの SDP 部分に対するコンテンツの長さを再計算し、さらにパケットの長さとチェックサムを計算し直します。
• SIP メッセージの SDP 部分で、エンドポートがリスニングを行うアドレスとポートとして指定されたポートのメディア コネクションを動的にオープンにします。
• SIP ヘッダーから送られる CALL_ID、FROM、TO 各インデックスを使用して、SIP インスペクション データベースで保持されるメディアのアドレスとポートにより、2 つのエンドポイント間で RTP と RTCP の接続をオープンにします。これらのインデックスはそれぞれコール、送信元、および宛先を識別します。
• RFC 3261 準拠性チェックを実行します。たとえば、要求メッセージのチェックを行って OPTIONS、INVITE、REGISTER、ACK、CANCEL、BYE のいずれかの定義済み方式が使用されていることを確認し、構文を検証します。
• SIP メッセージが、次の RFC 拡張方式に準拠しているかをチェックします。
• 必須ヘッダー フィールド(From、To、Call-Id、CSeq、Via、Max-Forwards)の指定と妥当性チェックを強制的に適用します。
• ヘッダー フィールドの URI と発信者と着信者の許可/拒否リストと照合します。ユーザが、保護ネットワーク上のいずれのホストとも通話が許可されていない場合は、SIP ACE モジュールにより SIP メッセージ(Response 603 Decline)が生成されます。
• Via フィールドをチェックして、特定の SIP プロキシ サーバから送られるメッセージを拒否します。
• RFC 3261 で指定された構文ルールに続くそれぞれメッセージのコンテキストで、各ヘッダー パラメータの妥当性をチェックします。
• オプションの User-Agent および Server ヘッダー フィールドを削除して、エンドポイント ソフトウェアのバージョンを隠します。
• Max-Forwards ヘッダー フィールドをチェックします。要求が宛先に到達する前に、Max-Forwards の値が 0 になると、ACE は、483 (Too Many Hops) のエラー応答とともに要求を拒否します。
• SIP ヘッダー フィールドに SIP URI と URI の指定があることを確認します。
• 未知の SIP 方式を処理します。SIP プロトコルは現在も進化を続け、数多くの拡張機能が追加されているため、新しい方式の中には ACE に認識されないものがあります(RFC 3261 で定義された方式と上記の拡張方式のみサポートされます)。ACE で「未知」の SIP 方式をどのように扱うかを設定することができます。
• サードパーティの登録/登録解除を許可または拒否し、こうした機能の実行を許可するユーザを指定します。このポリシーをイネーブルにしておくと、To と From のヘッダーが一致しない REGISTER メッセージ、およびいずれの特権 ユーザ ID にも一致しない From 値を含む REGISTER メッセージがドロップされます。
–Content-Length と Content-Type の値(ユーザ設定可能)を適用します。
–SIP メッセージ ボディの最大サイズを設定できます。要求、または応答の SIP メッセージが ACE モジュールを通過するときに、メッセージがチェックされ、サイズの制限に適合しているかが確認されます。適合しない場合は、ユーザがこのポリシーについて設定したアクションが実行されます。
–Content-Length ヘッダー フィールドの値と実際のメッセージ サイズとを照合します。
–Content-types のサブセットに ACE モジュールの通過を認めるかどうかを選択できます。Content-type の文字列を正規表現の形式(たとえば Application/SDP, text/html など)で指定できます。デフォルトの動作では、すべてのタイプが許可されます。
–SIP または SIPS URI の長さ(ユーザ設定可能)を適用します。
• Instant Messenger(IM)をイネーブルまたはディセーブルにします。
–SIP を介した IM をディセーブルにすると、ACE は SIMPLE RFC 拡張方式の指定に従い、IM に属するすべてのメッセージをドロップします。該当する警告メッセージを表示して、この機能でドロップされた方式を呼び出します。
–ACE モジュールによる IM の使用を禁止するユーザのリスト(regex 形式)を指定できます。
• ACE でどの SIP 方式をサポートするかを設定できます。また、追加の SIP 方式(ACE が準拠している RFC または RFC 拡張方式に含まれていない)を拒否するかどうかも指定できます。ACE では、無効な方式のリストが regex テーブルとして保持されます。
• Alert-Info や Call-Info といった危険性のあるヘッダー フィールド(悪意ある発信者が着信者側に不適切、攻撃的、危険、または違法なコンテンツを表示させるなどのフィールド)を隠したり、削除したりできます。
• IP アドレスのプライバシを保護できます。発信者と着信者の両方が同じサブネットのネットワーク内部に存在し、しかもプロキシが外部ネットワークに存在する場合は、双方がプロキシをバイパスして相互にコンタクトを試みる可能性があります。この機能をイネーブルにすると、プロキシから着信者に送るメッセージ中に埋め込まれたアドレスが固定されないため、このような直接コンタクトが抑制されます。したがって、着信者が発信者の実際の IP アドレスを知ることはできません。
表3-2 、 表3-3 および 表3-4 に、ACE でアプリケーション プロトコル インスペクションを設定する際に必要な手順の概要を示します。
• レイヤ 7 FTP 要求コマンド インスペクションを設定する概要については、 表3-2 を参照してください。
• レイヤ 7 HTTP のディープ インスペクションを設定する概要については、 表3-3 を参照してください。
• レイヤ 3 およびレイヤ 4 DNS、FTP、HTTP、ICMP、RTSP アプリケーション プロトコル インスペクションを設定する方法の概要については、 表3-4 を参照してください。
ここでは、FTP コマンド インスペクションの実行を ACE に許可するレイヤ 7 クラス マップおよびポリシー マップの作成方法について説明します。FTP コマンド インスペクションは、ウェブ ブラウザが FTP 要求の中にコマンドを埋め込んで ACE に送信することを防止するセキュリティ機能です。ACE は、新しいコマンドを許可する前に、個々の FTP コマンドについて確認応答しなければなりません。FTP インスペクションはデフォルトではトラフィックを許可し、セキュリティ チェックに合格しないトラフィックを制限します。コマンド フィルタリングでは、ACE により特定のコマンドを制限できます。ACE がコマンドを拒否した場合、その接続は終了します。
(注) レイヤ 4 ポリシー マップには、同じタイプの正規表現(regex)のインスタンスを最大で 1024 個関連付けることができます。この上限は Generic、HTTP、RADIUS、RDP、RTSP、SIP などの、レイヤ 7 ポリシー マップのすべてのタイプに適用されます。regex を設定する対象は次のとおりです。
• レイヤ 7 ポリシー マップのインライン match 文
• レイヤ 7 アクション リストのヘッダー挿入および書き換え(SSL URL 書き換えを含む)
• レイヤ 7 FTP コマンド インスペクション ポリシー マップの設定
コンフィギュレーション モードで class-map type ftp inspect コマンドを使用すると、FTP 要求コマンド インスペクションに使用されるクラス マップを定義できます。
class-map type ftp inspect match-any map_name
• match-any ― クラス マップ内に複数の一致基準が存在する場合に、FTP 要求コマンドの検査方法を指定します。クラス マップ内の一致基準のうち 1 つだけが、クラス マップの FTP コマンド インスペクション クラスと一致します。
• map_name ― クラス マップに割り当てられる名前。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。クラス名はクラス マップと、ポリシー マップのクラスのポリシーの設定に使用されます。
CLI は、クラス マップ FTP コマンド インスペクション コンフィギュレーション モードを表示します。ACE によるインスペクションの対象となる FTP 要求コマンドを分類するには、 match request-method コマンドを 1 つまたは複数含めて、レイヤ 7 クラス マップの一致基準を設定します。 「FTP 一致要求方式の定義」を参照してください。
たとえば、クラス マップの名前を FTP_INSPECT_L7CLASS に指定し、クラス マップ内の少なくとも 1 つの FTP インスペクション コマンドが満たされると ACE が一致を示すようにするには、次のように入力します。
ACE から FTP 要求インスペクション クラス マップを削除するには、次のように入力します。
description コマンドを使用すると、レイヤ 7 FTP インスペクション クラス マップの短い要約を記述できます。
description コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
text 引数を使用して、テキスト文字列を入力します。文字列は引用符を使用しない 240 文字までの英数字でです。
FTP コマンド インスペクションを実行するためのクラス マップであることを説明するには、次のように入力します。
クラス マップから説明を削除するには、次のように入力します。
match request-method コマンドを使用すると、クラス マップを設定することで ACE による FTP コマンド インスペクションの決定を定義できます。 match コマンドでは ACE にフィルタリングさせる FTP コマンドを指定します。
match request-method コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
match request-method ftp_commands
ftp_commands 引数は、ACE による FTP インスペクションの対象となる、クラス マップ内の FTP コマンドです。 ftp_commands に指定できるコマンドは、 appe 、 cd 、 cdup 、 dele 、 get 、 help 、 mkd 、 put 、 rmd 、 rnfr 、 rnto 、 site 、 stou 、 syst です。
クラス マップ内には複数の match request-method コマンドを指定できます。
たとえば、クラス マップの名前を FTP_INSPECT_L7CLASS に指定し、クラス マップ内の少なくとも 1 つの FTP インスペクション コマンドが満たされると ACE が一致を示すようにするには、次のように入力します。
クラス マップから FTP インスペクション要求方式を削除するには、同じコマンドの no 形式を使用します。
ここでは、レイヤ 7 FTP コマンド インスペクション ポリシー マップの設定方法の概要を説明します。レイヤ 7 ポリシー マップでは、クラス マップに定義された分類と一致するネットワーク トラフィックに対して実行する FTP コマンド インスペクションの適切なアクションを設定します。続いて、設定済みのレイヤ 7 FTP コマンド インスペクション ポリシーをレイヤ 3 およびレイヤ 4 ポリシー マップに関連付けて、VLAN インターフェイス上の動作をアクティブにします(「レイヤ 3 およびレイヤ 4 アプリケーション プロトコル インスペクションのポリシー アクションの設定」を参照してください)。
• レイヤ 7 FTP コマンド インスペクション ポリシー マップの作成
• レイヤ 7 FTP インスペクション ポリシー マップ デスクリプションの追加
• レイヤ 7 FTP コマンド インスペクション ポリシー マップへのインライン match 文の追加
コンフィギュレーション モードで policy-map type inspect ftp コマンドを使用すると、トラフィック ポリシーに名前を付け、FTP コマンド インスペクションを開始できます。
policy-map type inspect ftp first-match map_name
• ftp first-match ― ACE による FTP コマンド インスペクションを定義しているレイヤ 7 ポリシー マップを指定します。 first-match キーワードは、レイヤ 7 FTP コマンド インスペクション ポリシー マップの実行を定義します。ACE は最初に一致する分類に対して指定されたアクションのみを実行します。
• map_name ― ポリシー マップに割り当てられる名前。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
たとえば、レイヤ 7 FTP コマンド インスペクション ポリシー マップを作成するには、次のように入力します。
CLI は、ポリシー マップ コンフィギュレーション モードを表示します。
レイヤ 7 コマンド インスペクション ポリシー マップを ACE から削除するには、次のように入力します。
description コマンドを使用すると、レイヤ 7 FTP インスペクション ポリシー マップの短い要約を記述できます。
description コマンドを指定するには、ポリシー マップ FTP インスペクション コンフィギュレーション モードにアクセスする必要があります。
text 引数を使用して、テキスト文字列を入力します。文字列は引用符を使用しない 240 文字までの英数字です。
FTP コマンド インスペクションを実行するためのポリシー マップであることを説明するデスクリプションを追加するには、次のように入力します。
ポリシー マップからデスクリプションを削除するには、次のように入力します。
トラフィック クラスを指定しなくても、適切なレイヤ 7 match コマンドを入力することで、ポリシー マップに 1 つのインライン一致基準を含めることができます。インライン レイヤ 7 ポリシー マップの match コマンドは、レイヤ 7 クラス マップの match コマンドと同じように機能します。ただし、インライン match コマンドを使用する場合は、レイヤ 7 ポリシー マップに 1 つの match 文に対して 1 つのアクションを指定できます。
(注) 複数の match 文に対応したアクションを指定するには、「レイヤ 7 FTP コマンド インスペクション トラフィック クラスとトラフィック ポリシーの関連付け」の説明に従ってクラス マップを使用してください。
match name match_statement [ insert-before map_name ]
• name ― インライン match コマンドに割り当てる名前。スペースと引用符を使用しないテキスト文字列を入力します。インライン match 文の名前とそれに関連付けられるポリシー マップの名前の文字長の合計は、英数字で 64 文字を超えることはできません。たとえば、ポリシー マップの名前が L7_POLICY(9 文字)の場合、このポリシーでのインライン match 文の名前は英数字で 55 文字を超えることができません(64 - 9 = 55)。
• match_statement ― ポリシー マップが使用するインライン一致基準。レイヤ 7 FTP コマンド インスペクション クラス マップに関連付けられる match コマンドの詳細については、下記を参照してください。
• insert-before map_name ― (任意)インライン match コマンドを、ポリシー マップ コンフィギュレーションの既存クラス マップの前に配置します。
レイヤ 7 FTP コマンド インスペクション ポリシー マップのインライン match コマンド構文は、次のとおりです。
match name request-method { appe | cd | cdup | dele | get | help | mkd | put | rmd | rnfr | rnto | site | stou | syst }
インライン match コマンドの詳細については、「FTP 一致要求方式の定義」を参照してください。
たとえば、インライン match コマンドをレイヤ 7 FTP コマンド ポリシー マップに追加するには、次のように入力します。
Layer 7 FTP コマンド ポリシー マップからインライン match コマンドを削除するには、次のように入力します。
class コマンドを使用すると、 class-map コマンドで作成されたトラフィック クラスを指定してネットワーク トラフィックとトラフィック ポリシーを関連付けることができます。
map _name 引数は、トラフィックをトラフィック ポリシーに関連付けるために class-map コマンドを使用して設定した、すでに定義済みのトラフィック クラスの名前です。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
CLI は、ポリシー マップ クラス コンフィギュレーション モードを表示します。
たとえば、レイヤ 7 ポリシー マップに既存のクラス マップを指定するには、次のように入力します。
レイヤ 7 ポリシー マップからクラス マップを削除するには、次のように入力します。
デフォルトでは、ACE はすべての FTP コマンドを許可します。特定の FTP コマンドを明示的に拒否するには、指定した FTP トラフィックが分類と一致した場合のアクションとして次のコマンドのいずれかを使用します。指定したアクションは 1 つのインライン match コマンドまたは指定したクラス マップに適用します。
• deny ― 1 つのインライン match コマンドに対する FTP 要求コマンド、またはクラス マップに指定された FTP 要求コマンドについて、FTP セッションをリセットすることで拒否します。
• mask-reply ― FTP SYST コマンドおよびそれに関連する応答に対してのみ適用します。SYST コマンドは FTP サーバのオペレーティング システムの種類を知るために使用されます。 mask-reply キーワードを使用すると、ACE は FTP SYST コマンドの出力から重要な情報のフィルタリングを行って、システムの応答をマスクします。
たとえば、レイヤ 7 FTP インスペクション ポリシー マップにアクションを指定するには、次のように入力します。
レイヤ 7 FTP コマンド インスペクション ポリシー マップのアクションをディセーブルにするには、次のように入力します。
ここでは、ACE による HTTP ディープ パケット インスペクションに使用されるレイヤ 7 クラス マップおよびポリシー マップの作成方法について説明します。ACE は HTTP プロトコルのステートフル ディープ パケット インスペクションを実行し、ポリシー マップに設定されたアクションに基づいてトラフィックの許可や制限を行います。ACE が実行する HTTP ディープ パケット インスペクションには、次のセキュリティ機能が含まれています。
• HTTP ヘッダー名、URL 名、または HTTP エンティティ本体のコンテンツの表現に基づいた正規表現一致処理
• コンテンツ、URL、および HTTP ヘッダー長のチェック
• RFC 準拠性モニタリングおよび RFC 方式フィルタリング
(注) レイヤ 4 ポリシー マップには、同じタイプの正規表現(regex)のインスタンスを最大で 1024 個関連付けることができます。この上限は Generic、HTTP、RADIUS、RDP、RTSP、SIP などの、レイヤ 7 ポリシー マップのすべてのタイプに適用されます。regex を設定する対象は次のとおりです。
• レイヤ 7 ポリシー マップのインライン match 文
• レイヤ 7 アクション リストのヘッダー挿入および書き換え(SSL URL 書き換えを含む)
• レイヤ 7 HTTP ディープ インスペクション クラス マップの設定
• レイヤ 7 HTTP ディープ インスペクション ポリシー マップの設定
• HTTP ディープ インスペクション クラス マップの作成
• レイヤ 7 HTTP ディープ パケット インスペクション クラス マップ デスクリプションの追加
• インスペクション対象とする HTTP コンテンツ長の定義
• HTTP インスペクションに対するセカンダリ クッキーの定義
• インスペクション対象とする HTTP 最大ヘッダー長の定義
HTTP トラフィックのディープ パケット インスペクションを実行するためのレイヤ 7 クラス マップを作成するには、コンフィギュレーション モードで class-map type http inspect コマンドを使用します。
class-map type http inspect [ match-all | match-any ] map_name
• match-all | match-any ― (任意)クラス マップ内に複数の一致基準が存在する場合に、HTTP トラフィックのディープ パケット インスペクションの実行方法を指定します。 match コマンドが次のいずれかの条件と一致すると、クラス マップは一致したとみなされます。
– match-all ― (デフォルト)ネットワーク トラフィックがレイヤ 7 HTTP ディープ パケット インスペクション クラス マップと一致するには、すべての一致基準を満足する(暗黙的な AND)必要があります。 match-all キーワードは、異なるタイプの HTTP ディープ パケット インスペクションの match 文にのみ適用できます。たとえば、URL、HTTP ヘッダー、および URL コンテンツ文に対して match-all 条件を指定することは有効です。しかし、同じクラス マップ内に同じ名前または複数の URL を持つ複数の HTTP ヘッダーに対して match-all 条件を指定することは無効です。
– match-any ― ネットワーク トラフィックがレイヤ 7 HTTP ディープ パケット インスペクション クラス マップに一致するには、一致基準の 1 つだけを満足する(暗黙的な OR)必要があります。 match-any キーワードは、同じタイプのレイヤ 7 HTTP ディープ パケット インスペクションの match 文にのみ適用できます。たとえば、ACE では同じクラス マップ内の URL、HTTP ヘッダー、および URL コンテンツ文に対して match-any 条件を指定できますが、同じクラス マップ内に異なる名前を持つ複数の URL、複数の HTTP ヘッダー、または複数の URL コンテンツ文に対して match-any 条件を指定することはできません。
• map_name ― クラス マップに割り当てられる名前。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
CLI は、クラス マップ HTTP アプリケーション プロトコル インスペクションのコンフィギュレーション モードを表示します。ACE で評価するためにトラフィックの HTTP アプリケーション インスペクションを分類するには、次のコマンドを 1 つまたは複数含めてレイヤ 7 クラス マップの一致基準を設定します。
• match content ― 「HTTP コンテンツ一致基準の定義」を参照してください。
• match content length ― 「インスペクション対象とする HTTP コンテンツ長の定義」を参照してください。
• match cookie secondary ― 「HTTP インスペクションに対するセカンダリ クッキーの定義」を参照してください。
• match header ― 「インスペクション対象とする HTTP ヘッダーの定義」を参照してください。
• match header length ― 「インスペクション対象とする HTTP 最大ヘッダー長の定義」を参照してください。
• match header mime-type ― 「インスペクション対象とするヘッダー MIME タイプ メッセージの定義」を参照してください。
• match port-misuse ― 「HTTP トラフィック制限カテゴリの定義」を参照してください。
• match request-method ― 「HTTP の要求方式と拡張方式の定義」を参照してください。
• match transfer-encoding ― 「HTTP 転送符号化タイプの定義」を参照してください。
• match url ― 「インスペクション対象とする HTTP URL の定義」を参照してください。
• match url length ― 「インスペクション対象とする HTTP 最大 URL 長の定義」を参照してください。
クラス マップには複数の match コマンドを使用できます。
たとえば、クラス マップの名前として HTTP_INSPECT_L7CLASS を指定し、レイヤ 7 HTTP アプリケーション インスペクション クラス マップ内の少なくとも 1 つのコマンドが満足すると ACE が一致を示すようにするには、次のように入力します。
ACE から HTTP アプリケーション インスペクション クラス マップを削除するには、次のように入力します。
description コマンドを使用すると、レイヤ 7 HTTP ディープ パケット インスペクション クラス マップの簡単な説明を記述できます。
description コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
text 引数を使用して、テキスト文字列を入力します。文字列は引用符を使用しない 240 文字までの英数字です。
HTTP ディープ パケット インスペクションを実行するためのクラス マップであることを説明するには、次のように入力します。
クラス マップから説明を削除するには、次のように入力します。
match content コマンドを使用すると、HTTP エンティティ本体に含まれているコンテンツの表現に基づいて HTTP アプリケーション インスペクションを定義するように、クラス マップを設定できます。
match content コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match content expression [ offset number ]
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• expression ― HTTP エンティティ本体に含まれているコンテンツの表現。入力できる範囲は英数字で 1 ~ 255 文字です。正規表現で使用できるサポートされている文字の一覧は、 表3-5 を参照してください。
(注) データ文字列を照合するときは、正規表現中でピリオド(.)と疑問符(?)はリテラルの意味を持たないことに注意してください。これらの記号を照合するときは角カッコ([ ])を使用します(たとえば www.xyz.com の場合は、www[.]xyz[.]com と入力)。また、バックスラッシュ(\)を使用してピリオド(.)や疑問符(?)をエスケープすることもできます。
• offset number ― コンテンツ表現検索文字列の開始位置を示す絶対オフセット値を指定します。オフセットは、メッセージのヘッダーとボディの間の空白行(CR、LF、CR、LF)に続くメッセージ ボディの最初のバイトから始まります。オフセット値の範囲は 1 ~ 4000 バイトです。
たとえば、HTTP 要求で送信されたエンティティ本体に含まれているコンテンツ表現を指定するクラス マップを作成するには、次のように入力します。
クラス マップからコンテンツ表現チェックの一致基準を削除するには、次のように入力します。
match content length コマンドを使用すると、設定されたコンテンツ解析最大長以下の長さの HTTP トラフィックに対して HTTP アプリケーション インスペクションを定義するように、クラス マップを設定できます。指定された基準と一致するメッセージは、レイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップのアクションに基づいて許可または拒否されます。
match content length コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match content length { eq bytes | gt bytes | lt bytes | range bytes1 bytes 2 }
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• eq bytes ― ACE が受信する HTTP メッセージ内のコンテンツ解析長の値を指定します。ポリシー マップのアクションに基づいて、ACE は指定された値と同じ長さのコンテンツを持つメッセージを許可または拒否します。有効な範囲は 1 ~ 65535 バイトです。
• gt bytes ― ACE が受信する HTTP メッセージ内のコンテンツ解析長の最小値を指定します。ポリシー マップのアクションに基づいて、ACE は指定された値を超える長さのコンテンツを持つメッセージを許可または拒否します。有効な範囲は 1 ~ 65535 バイトです。
• lt bytes ― ACE が受信する HTTP メッセージ内のコンテンツ解析長の最大値を指定します。ポリシー マップのアクションに基づいて、ACE は指定された値を下回る長さのコンテンツを持つメッセージを許可または拒否します。有効な範囲は 1 ~ 65535 バイトです。
• range bytes1 bytes2 ― ACE が受信する HTTP メッセージ内のコンテンツ解析長の範囲を指定します。ポリシー マップのアクションに基づいて、ACE はこの範囲内の長さのコンテンツを持つメッセージを許可または拒否します。指定できる範囲は 1 ~ 65535 バイトです。
たとえば、ACE が受信できる HTTP メッセージのコンテンツ長を指定するクラス マップを作成するには、次のように入力します。
クラス マップから HTTP コンテンツ長の一致基準を削除するには、次のように入力します。
クラス マップ HTTP インスペクションのコンフィギュレーション モードで
match cookie secondary コマンドを使用してクラス マップを設定することにより、セカンダリ クッキー(URL の照会文字列)の名前、またはプレフィクスと値に基づいてインスペクションを定義することができます。通常、ACE では、URL 文字列中の疑問符(?)までの URL (疑問符は除く)を解析します。この機能は、ACE が疑問符以降の URL パラメータも対象として URL 解析を実行できるように機能が拡張されています。ACE ではこのコマンドを使用して、POST 要求の HTTP コンテンツ中にあるセカンダリ クッキーの照合を行うこともできます。このコマンドは、クラス マップの match 文、またはレイヤ 7 ポリシー マップのインライン match 文(構文がわずかに異なる)のいずれかとして提供されます。インライン match 文の詳細については「レイヤ 7 ディープ パケット インスペクション ポリシー マップへのインライン match 文の追加」を参照してください。
match cookie secondary [ name cookie_name | prefix prefix_name ] value expression
• name cookie_name ― 照合するセカンダリ クッキーの ID を指定します。「"」記号で囲まずに、64 文字までの英数字でスペースを入れずにテキスト文字列を入力します。
• prefix prefix_name ― (任意)照合するセカンダリ クッキーのプレフィクスを指定します。スペースと引用符を使用しない、64 文字までの英数字でテキスト文字列を入力します。
• value expression ― (任意)照合するセカンダリ クッキーの正規表現を指定します。スペースと引用符を使用しない、255 文字までの英数字でテキスト文字列を入力します。正規表現で使用できるようにサポートされている文字の一覧については、 表3-5 を参照してください。
(注) データ文字列を照合するときは、正規表現中でピリオド(.)と疑問符(?)はリテラルの意味を持たないことに注意してください。これらの記号を照合するときは角カッコ([ ])を使用します(たとえば www.xyz.com の場合は、www[.]xyz[.]com と入力)。また、バックスラッシュ(\)を使用してピリオド(.)や疑問符(?)をエスケープすることもできます。
|
|
---|---|
HTTP インスペクションのセカンダリ クッキー match 文の設定に際し、次の設定ガイドラインが適用されます。
• セカンダリ クッキー名が、同じ match-all クラス マップ中にある別のセカンダリ クッキー名と重複していないことを確認してください。たとえば次の設定は、2 つの match 文でクッキー名が重複するため、認められません。
• 1 つの match-all クラス マップにあるすべてのセカンダリ クッキー名についてセカンダリ クッキー値の照合を設定する場合、値のみ一致するセカンダリ クッキーが名前のワイルドカードでの一致に相当するため、同じクラス マップの中で別のセカンダリ クッキーに照合させる設定は認められません。次の例で、2 つめの match 文は許可されません。
たとえば、"matchme" というセカンダリ クッキーと .*abc123 という正規表現を照合する場合は、次のように入力します。
たとえば、"ab" という文字列から始まるクッキー名をすべて照合するには、次のように入力します。
たとえば、すべてのセカンダリ クッキー値に含まれる特定の regex を照合するには、次のように入力します。
クラス マップからセカンダリ クッキーの match 文を削除する場合は、次のように、 no 形式のコマンドを入力します。
match header コマンドを使用すると、HTTP ヘッダー内の名前と値に基づいて HTTP アプリケーション インスペクションを定義するように、クラス マップを設定できます。ACE は、特定の接続から受信したパケット データを HTTP ヘッダー表現に基づいて照合する正規表現の一致処理を実行します。
match header コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match header { header_name | header_field } header-value expression
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• header_ name ― 一致する HTTP ヘッダーの名前(例:www.example1.com)。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。また、文字列全体を引用符(")で括った場合は、スペースを含んだテキスト文字列を入力できます。既定のヘッダー フィールドの一覧については、 表3-6 を参照してください。
(注) header_name 引数では HTTP ヘッダーの名前にコロンを含めることはできません。ACE はコロンを無効な語句要素として拒否します。
• header_field ― HTTP/1.1 標準ヘッダー フィールド。選択できるフィールドには、request-header フィールド、general-header フィールド、および entity-header フィールドがあります。 表3-6 に、サポートされる HTTP/1.1 ヘッダー フィールドを示します。
• header-value expression ― HTTP ヘッダーの特定のフィールドに含まれる値との比較に使用するヘッダー値表現文字列を指定します。入力できる範囲は英数字で 1 ~ 255 文字です。Accept-Language、User-Agent、Host などの既定のヘッダー フィールドがあります。ACE は一致処理で正規表現をサポートしています。これらの表現は、 header-name: expression の形式でヘッダー マップ内に格納されます。ヘッダー表現にはスペースを使用できますが、エスケープ シーケンスまたは引用符が必要です。正規表現で使用できるサポートされている文字の一覧は、 表3-5 を参照してください。
(注) データ文字列を照合するときは、正規表現中でピリオド(.)と疑問符(?)はリテラルの意味を持たないことに注意してください。これらの記号を照合するときは角カッコ([ ])を使用します(たとえば www.xyz.com の場合は、www[.]xyz[.]com と入力)。また、バックスラッシュ(\)を使用してピリオド(.)や疑問符(?)をエスケープすることもできます。
たとえば、HTTP ヘッダーで一致させてアプリケーション インスペクションを実行するようにレイヤ 7 クラス マップを指定するには、次のように入力します。
たとえば、ワイルドカード検索をエミュレートしヘッダー値表現文字列と一致させる正規表現をクラス マップに指定するには、次のように入力します。
クラス マップから HTTP ヘッダーの一致基準を削除するには、次のように入力します。
デフォルトでは、HTTP ディープ パケット インスペクションの最大ヘッダー長は 2048 バイトです。 match header length コマンドを使用すると、HTTP メッセージ内のエンティティ本体の長さに基づいて ACE を通過できる HTTP トラフィックを制限できます。メッセージは、レイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップのアクションに基づいて許可または拒否されます。
match header length コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match header length { request | response } { eq bytes | gt bytes | lt bytes | range bytes1 bytes 2 }
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• request ― ACE が受信できる HTTP ヘッダー要求メッセージのサイズを指定します。
• response ― ACE が送信する HTTP ヘッダー応答メッセージのサイズを指定します。
• eq bytes ― ACE が受信する HTTP メッセージ内のエンティティ本体の値を指定します。ポリシー マップのアクションに基づいて、ACE は指定された値と同じサイズのエンティティ本体を持つメッセージを許可または拒否します。有効な範囲は 1 ~ 65535 バイトです。
• gt bytes ― ACE が受信する HTTP メッセージ内のエンティティ本体の最小値を指定します。ポリシー マップのアクションに基づいて、ACE は指定された値を超えるサイズのエンティティ本体を持つメッセージを許可または拒否します。有効な範囲は 1 ~ 65535 バイトです。
• lt bytes ― ACE が受信する HTTP メッセージ内のエンティティ本体の最大値を指定します。ポリシー マップのアクションに基づいて、ACE は指定された値を下回るサイズのエンティティ本体を持つメッセージを許可または拒否します。有効な範囲は 1 ~ 65535 バイトです。
• range bytes1 bytes2 ― ACE が受信する HTTP メッセージ内のエンティティ本体のサイズの範囲を指定します。ポリシー マップのアクションに基づいて、ACE はこの範囲内のサイズのエンティティ本体を持つメッセージを許可または拒否します。指定できる範囲は 1 ~ 65535 バイトです。
たとえば、HTTP メッセージのエンティティ本体の長さが 3600 バイト以下で受信した HTTP トラフィックと一致するようにクラス マップを指定するには、次のように入力します。
クラス マップから HTTP 最大ヘッダー長の一致基準を削除するには、次のように入力します。
match header mime-type コマンドを使用すると、ACE がポリシー マップのアクションに基づいて許可または拒否をする MIME タイプ メッセージのサブセットを指定できます。MIME タイプの検証機能がインターネット メールの形式について拡張され、非 US ASCII テキスト メッセージ、非テキスト メッセージ、マルチパート メッセージ ボディ、およびメッセージ ヘッダー内の非 US ASCII 情報を扱うことができます。
(注) match header mime-type コマンドでサポートされているものに追加して MIME タイプ メッセージを定義するには、match header コマンドを使用します。たとえば、新しい MIME タイプ audio\myaudio の一致を定義する場合は、次のように match 文を入力します。match header Content-type header-value audio/myaudio.詳細については、「インスペクション対象とする HTTP ヘッダーの定義」を参照してください。
[ line_number ] match header mime-type mime_type
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• mime_type ― image\Jpeg, text\html, application/msword、audio\mpeg などの既定の MIME タイプのリスト。このリストに含まれた MIME タイプのみ ACE の通過を許可するのか、またはすべての MIME タイプを受け入れ可能なのかを選択します。デフォルトの動作では、すべての MIME タイプが許可されます。
match header mime-type コマンドを使用する場合は、次のガイドラインに従ってください。
• クラス マップ内には複数の match header mime-type コマンドを指定できます。
• 各 match header mime-type コマンドでは 1 つのアプリケーション タイプを設定します。
たとえば、MIME タイプ audio\midi および audio\mpeg のメッセージが ACE を通過することを許可するクラス マップを作成する場合は、次のように入力します。
クラス マップから MIME メッセージの一致基準を指定して解除するには、次のように入力します。
match port-misuse コマンドを使用すると、ACE を通過する特定の HTTP トラフィックを制限するアプリケーション インスペクション コンプライアンスを定義するように、クラス マップを設定できます。このクラス マップでは、ピアツーピア(p2p)アプリケーション、トンネリング アプリケーション、インスタンス メッセージングといったトンネリング プロトコルに対するポート 80(または HTTP を実行する他のすべてのポート)の誤使用を検出します。
match port-misuse コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match port-misuse application_category
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• application_category ― クラス マップの制限 HTTP アプリケーション カテゴリ。 application_category に使用可能な値は、次のとおりです。
– im ― インスタント メッセージング アプリケーション カテゴリ。ACE は、Yahoo Messenger インスタント メッセージング アプリケーションについてチェックします。
– p2p ― ピアツーピア アプリケーション カテゴリ。チェックされるアプリケーションには、Kazza、Gnutella などがあります。
– tunneling ― トンネリング アプリケーション カテゴリ。チェックされるアプリケーションには、HTTPort/HTTHost、GNU Httptunnel、Firethru などがあります。
match port-misuse コマンドを使用する場合は、次のガイドラインに従ってください。
• クラス マップ内には複数の match port-misuse コマンドを指定できます。
• 各 match port-misuse コマンドでは 1 つのアプリケーション タイプを設定します。
• ポート誤使用に関するアプリケーション インスペクションのプロセスでは、HTTP メッセージのエンティティ本体の検索が必要です。この検索により ACE のパフォーマンスが低下する場合があります。
• ACE は、デフォルトで match port-misuse コマンドをディセーブルにします。制限 HTTP アプリケーション カテゴリを設定しない場合、ACE はデフォルトの動作により、ログを生成せずに各アプリケーションを許可します。
たとえば、ピアツーピア アプリケーションを制限 HTTP トラフィックとして指定するクラス マップを作成するには、次のように入力します。
クラス マップから制限 HTTP アプリケーション カテゴリの一致基準を削除するには、次のように入力します。
デフォルトでは、ACE はすべての要求方式と拡張方式を許可します。 match request-method コマンドを使用すると、RFC 2616 に規定されている要求方式および HTTP 拡張方式に基づいてアプリケーション インスペクション コンプライアンスを定義するように、クラス マップを設定できます。HTTP 要求方式または拡張方式の準拠性チェックに失敗した場合、ACE は指定された HTTP トラフィックをポリシー マップのアクションに基づいて拒否するかリセットします。
match request-method コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match request-method { ext method | rfc method }
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• ext method ― HTTP 拡張方式を指定します。RFC 要求メッセージに RFC 2616 HTTP 要求方式が何も含まれていない場合、ACE はメッセージが拡張方式かどうかを確認します。ACE は、次の HTTP 要求拡張方式のインスペクションをサポートします。 copy 、 edit 、 getattr 、 getattrname 、 getprops 、 index 、 lock 、 mkdir 、 move 、 revadd 、 revlabel 、 revlog 、 revnum 、 save 、 setattr 、 startrev 、 stoprev 、 unedit 、および unlock 。
• rfc method ― RFC 準拠性チェックの実施対象にする RFC 2616 HTTP 要求方式を指定します。ACE は、次の RFC 2616 HTTP 要求方式のインスペクションをサポートします。 connect 、 delete 、 get 、 head 、 options 、 post 、 put 、および trace 。
match request-method コマンドを使用する場合は、次のガイドラインに従ってください。
• クラス マップ内には複数の match request-method コマンドを指定できます。
• 各 match request-method コマンドでは 1 つの要求方式を設定します。
• サポートされない HTTP 要求方式については、 inspect http strict コマンドをレイヤ 3 およびレイヤ 4 ポリシー マップのアクションとして記述します。
• ACE は、デフォルトで match request-method コマンドをディセーブルにします。要求方式を設定しない場合、ACE はデフォルトの動作により、ログを生成せずに RFC 2616 HTTP 要求方式を許可します。
たとえば、HTTP アプリケーション プロトコル インスペクションの対象に connect 、 get 、 head 、および index HTTP RFC 2616 プロトコルを指定するクラス マップを作成するには、次のように入力します。
クラス マップから RFC 2616 HTTP 要求方式の一致基準を削除するには、次のように入力します。
match transfer-encoding コマンドを使用すると、ACE を通過できる HTTP 転送符号化タイプを制限するアプリケーション インスペクション コンプライアンスを定義するように、クラス マップを設定できます。transfer-encoding general-header フィールドは、送信者と受信者の間でメッセージを安全に転送するために HTTP メッセージ ボディに適用された変換のタイプを示します(何か適用されている場合)。HTTP 要求メッセージに転送符号化タイプが設定されていると、ACE はポリシー マップに設定されたアクションを実行します。
match transfer-encoding コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match transfer-encoding coding_types
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• coding_types ― クラス マップの HTTP 転送符号化タイプ。 coding_types に使用可能な値は、次のとおりです。
– chunked ― メッセージ ボディは連続するチャンクとして転送されます。
– compress ― UNIX 共通の圧縮プログラムである「compress」により生成される符号化形式。この形式は、Lempel-Ziv-Welch(LZW)に適応性を持たせたバージョンです。
– deflate ― RFC 1951 に規定されたデフレート圧縮メカニズムを使用する、RFC 1950 に規定された .zlib 形式
– gzip ― RFC 1952 の規定に従って、ファイル圧縮プログラム(GNU zip)で生成される符号化形式。この形式は Lempel-Ziv の 32 ビット CRC を使用したバージョンです(LZ77)。
– identity ― デフォルト(同一性)の符号化で、変換を用いる必要がありません。
match transfer-encoding コマンドを使用する場合は、次のガイドラインに従ってください。
• クラス マップ内には複数の match transfer-encoding コマンドを指定できます。
• 各 match transfer-encoding コマンドでは 1 つのアプリケーション タイプを設定します。
• ACE は、デフォルトで match transfer-encoding コマンドをディセーブルにします。
たとえば、チャンク形式の HTTP 転送符号化タイプを指定することにより ACE を通過する HTTP トラフィックを制限するクラス マップを作成するには、次のように入力します。
クラス マップから HTTP 転送符号化の一致基準を削除するには、次のように入力します。
match url コマンドを使用すると、URL 名に基づいて HTTP アプリケーション インスペクションを定義するように、クラス マップを設定できます。HTTP は、特定の接続から受信したパケット データを URL の表現に基づいて対照する正規表現一致処理を実行します。
match url コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match url expression
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• expression ― 一致させる URL または URL の一部。URL 文字列の範囲は 1 ~ 255 文字です。www.hostname.domain に続く URL 部分のみを match 文に含めます。たとえば、URL が www.anydomain.com/latest/whatsnew.html の場合、/latest/whatsnew.html のみを含めます。www.anydomain.com 部分と一致させる場合は、URL 文字列を URL 正規表現の形式にすることができます。ACE は一致処理で正規表現をサポートしています。正規表現で使用できるサポートされている文字の一覧は、 表3-5 を参照してください。
(注) URL と一致させる場合、ピリオド(.)は正規表現においては文字通りの意味を持ちません。角カッコ([ ])またはバックスラッシュ(\)文字を使用して、ピリオド記号と一致させます。たとえば、
www.xyz.com とせずに www[.]xyz[.]com と指定します。
たとえば、特定の URL と一致させてアプリケーション インスペクションを実行するようにレイヤ 7 クラス マップを指定するには、次のように入力します。
たとえば、正規表現を使用してワイルドカード検索をエミュレートすることで任意の .gif または .html ファイルと一致させるには、次のように入力します。
クラス マップから URL の一致基準を削除するには、次のように入力します。
match url length コマンドを使用すると、ACE が受信できる要求メッセージの最大 URL 長を指定することにより、ACE を通過できる HTTP トラフィックを制限できます。メッセージは、レイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップのアクションに基づいて許可または拒否されます。
match url length コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match url length { eq bytes | gt bytes | lt bytes | range bytes1 bytes 2 }
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• eq bytes ― ACE が受信する HTTP URL の長さを指定します。ポリシー マップのアクションに基づいて、ACE は指定された値と同じ長さの HTTP URL を持つメッセージを許可または拒否します。有効な範囲は 1 ~ 65535 バイトです。
• gt bytes ― ACE が受信する HTTP URL の長さの最小値を指定します。ポリシー マップのアクションに基づいて、ACE は指定された値を超える長さの HTTP URL を持つメッセージを許可または拒否します。有効な範囲は 1 ~ 65535 バイトです。
• lt bytes ― ACE が受信する HTTP URL の長さの最大値を指定します。ポリシー マップのアクションに基づいて、ACE は指定された値を下回る長さの HTTP URL を持つメッセージを許可または拒否します。有効な範囲は 1 ~ 65535 バイトです。
• range bytes1 bytes2 ― ACE が受信する HTTP URL の長さ範囲を指定します。ポリシー マップのアクションに基づいて、ACE はこの範囲内の長さの URL を持つメッセージを許可または拒否します。指定できる範囲は 1 ~ 65535 バイトです。
たとえば、要求メッセージ内の 10000 バイト長の URL と一致するようにクラス マップを指定するには、次のように入力します。
クラス マップから URL 長の一致基準を削除するには、次のように入力します。
ここでは、レイヤ 7 HTTP ディープ インスペクション ポリシー マップの設定方法について説明します。レイヤ 7 ポリシー マップでは、クラス マップに定義された分類と一致するネットワーク トラフィックに対して実行する HTTP ディープ パケット インスペクションの適切なアクションを設定します。続いて、設定済みのレイヤ 7 HTTP ディープ パケット インスペクション ポリシーをレイヤ 3 およびレイヤ 4 ポリシー マップに関連付けて、VLAN インターフェイス上の動作をアクティブにします(「レイヤ 3 およびレイヤ 4 アプリケーション プロトコル インスペクションのポリシー アクションの設定」を参照してください)。
• レイヤ 7 HTTP ディープ インスペクション ポリシー マップの作成
• レイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップ デスクリプションの追加
• レイヤ 7 ディープ パケット インスペクション ポリシー マップへのインライン match 文の追加
コンフィギュレーション モードで policy-map type inspect http コマンドを使用すると、トラフィック ポリシーに名前を付け、レイヤ 7 HTTP ディープ パケット インスペクションを開始できます。
policy-map type inspect http all-match map_name
• http all-match ― ACE による HTTP プロトコルのディープ パケット インスペクションを開始するポリシー マップを指定します。ACE はすべての指定された条件を一致分類と照合し、すべての一致するクラスのアクションを実行する処理を、一致要求が拒否されるまで行います。
• map_name ― ポリシー マップに割り当てられる名前。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
たとえば、レイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップを作成するには、次のように入力します。
CLI は、ポリシー マップ コンフィギュレーション モードを表示します。
レイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップを ACE から削除するには、次のように入力します。
description コマンドを使用すると、レイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップの簡単な概要を記述できます。
description コマンドを指定するには、ポリシー マップ コンフィギュレーション モードにアクセスする必要があります。
text 引数を使用して、テキスト文字列を入力します。文字列は引用符を使用しない 240 文字までの英数字です。
HTTP ディープ パケット インスペクションを実行するためのポリシー マップであることを説明するには、次のように入力します。
ポリシー マップから説明を削除するには、次のように入力します。
トラフィック クラスを指定しなくても、適切なレイヤ 7 match コマンドを入力することで、ポリシー マップに 1 つのインライン一致基準を含めることができます。レイヤ 7 ポリシー マップのインライン match コマンドは、レイヤ 7 クラス マップの match コマンドと同じように機能します。ただし、インライン match コマンドを使用する場合は、レイヤ 7 ポリシー マップに 1 つの match 文だけに対応したアクションを指定できます。
(注) 複数の match 文に対応したアクションを指定するには、「レイヤ 7 HTTP インスペクション トラフィック クラスとトラフィック ポリシーの関連付け」の説明に従ってクラス マップを使用してください。
match name match_statement [ insert-before map_name ]
• name ― インライン match コマンドに割り当てる名前。スペースと引用符を使用しないテキスト文字列を入力します。インライン match 文の名前とそれに関連付けられるポリシー マップの名前の文字長の合計は、英数字で 64 文字を超えることはできません。たとえば、ポリシー マップの名前が
L7_POLICY(9 文字)の場合、このポリシーでのインライン match 文の名前は英数字で 55 文字を超えることができません(64 - 9 = 55)。
• match_statement ― ポリシー マップが使用するインライン一致基準。レイヤ 7 HTTP ディープ パケット インスペクション クラス マップに関連付けられる各 match コマンドの詳細については、下記を参照してください。
• insert-before map_name ― (任意)インライン match コマンドを、ポリシー マップ コンフィギュレーション内の既存のクラス マップの前方に配置します。
HTTP ディープ パケット インスペクション ポリシー マップのインライン match コマンド構文は、次のとおりです。
match name content expression [ offset number ]
match name content length { eq bytes | gt bytes | lt bytes | range bytes1 bytes 2 }
match name content-type-verification
match name cookie secondary [ name cookie_name | prefix prefix_name ] value expression
match name header { header_name | header_field } header-value expression
match name header length { request | response } { eq bytes | gt bytes | lt bytes | range bytes1 bytes 2 }
match name header mime-type mime_type
match name port-misuse application_categor y
match name request-method { ext method | rfc method }
match name transfer-encoding coding_types
match name url length { eq bytes | gt bytes | lt bytes | range bytes1 bytes 2 }
各インライン match コマンドの詳細については、「レイヤ 7 HTTP ディープ インスペクション クラス マップの設定」を参照してください。
match content-type-verification および match strict-http コマンドは、レイヤ 7 policy-map type inspect http コマンド下のインライン match コマンドとしてのみ使用できます。この 2 つのレイヤ 7 HTTP ディープ インスペクション一致基準は、他の一致基準と組み合わせることができないので、ポリシー マップのインライン match コマンドとして使用します。
この 2 つの match コマンドは、HTTP ディープ インスペクションの次の機能を実行します。
• match content-type-verification ― コンテンツの MIME タイプ メッセージとヘッダーの MIME タイプと比較します。このインライン match コマンドは、ACE を通過できる HTTP メッセージの MIME タイプを制限します。具体的には、ヘッダー MIME タイプの値がサポート対象の MIME タイプをまとめた内部リストに含まれていることを確認し、ヘッダー MIME タイプがメッセージのデータまたはエンティティ本体部分の実コンテンツと一致することを確認します。これらが一致しない場合、ACE はレイヤ 7 ポリシー マップで指定されたアクションの permit または reset を実行します。
(注) MIME タイプの HTTP インスペクション プロセスでは、コンテンツ解析の設定最大長までの長さの HTTP メッセージを検索する必要があり、この検索によって ACE のパフォーマンスが低下する場合があります。
• match strict-http ― 内部の準拠性チェックにより、メッセージが HTTP の RFC 規格(RFC 2616)に準拠していることを確認します。HTTP メッセージが準拠していない場合、ACE はレイヤ 7 ポリシー マップで指定されたアクションの permit または reset を実行します。
たとえば、インライン match コマンドをレイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップに追加するには、次のように入力します。
class コマンドを使用すると、 class-map コマンドで作成されたトラフィック クラスを指定してネットワーク トラフィックとトラフィック ポリシーを関連付けることができます。
map _name 引数は、トラフィックをトラフィック ポリシーに関連付けるために class-map コマンドを使用して設定した、すでに定義済みのトラフィック クラスの名前です。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
CLI は、ポリシー マップ クラス コンフィギュレーション モードを表示します。
たとえば、レイヤ 7 ポリシー マップに既存のクラス マップを指定するには、次のように入力します。
レイヤ 7 ポリシー マップからクラス マップを削除するには、次のように入力します。
以前に指定したクラス マップの前方の位置にクラス マップを手動で挿入するには、 insert-before コマンドを使用します。ACE は、 insert-before コマンドによる並び替えをコンフィギュレーションの一部として保存しません。
class map_name1 insert-before map_name2
• class map_name1 ― class-map コマンドを使用して定義したトラフィック クラスの名前を指定します。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
• insert-before map_name2 ― 現在のクラス マップを map_name2 引数で示された既存のクラス マップの前方に配置します。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
たとえば、 insert-before コマンドを使用して、ポリシー マップ内の 2 つのクラス マップの順番を定義するには、次のように入力します。
トラフィック ポリシーに対応する class-default クラス マップを指定するには、 class class-default コマンドを使用します。指定されたクラス マップ内の他の一致基準を満たさないトラフィックは、すべてデフォルト トラフィック クラスに属します。ACE は、指定された分類のいずれも一致しない場合、 class class-default コマンド下の指定されたアクションと一致させます。 class-default クラス マップには、すべてのトラフィックと一致するにように、暗黙的に match any 文が含まれています。
(注) デフォルトでは、どの一致も HTTP 要求メッセージと応答メッセージの両方に適用されますが、class class-default コマンドの場合は HTTP 要求にのみ適用されます。
たとえば、 class class-default コマンドを使用するには、次のように入力します。
ACE のデフォルトの動作では、HTTP トラフィックを許可します。たとえば、ポリシー マップが HTTP GET 方式を明示的に許可している場合、PUT などの他の方式も許可されます。明示的に拒否された場合にのみ、トラフィックはドロップされます。
指定したコマンドとHTTP トラフィックが一致したかどうかに応じて、そのトラフィックに対して ACE が実行するアクションを定義するには、 permit または reset コマンドを指定します。permit または reset コマンドは 1 つのインライン match コマンドまたは指定したクラス マップに対して適用します。
レイヤ 7 HTTP ディープ パケット インスペクション ポリシー コマンドは、次のとおりです。
• permit ― 指定した HTTP トラフィックがクラス マップまたはインライン match コマンドに指定した HTTP ディープ パケット インスペクション一致基準を満足した場合に、ACE はその HTTP トラフィックを受信できます。
• reset ― クライアントまたはサーバに TCP リセット メッセージを送信して接続を終了することで、指定された HTTP トラフィックを拒否します。
たとえば、レイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップにアクションを指定するには、次のように入力します。
デフォルトでは HTTP パケットが許可されるので、この機能をディセーブルにするにはクラス マップを削除する必要があります。たとえば、次のように入力します。
HTTP インスペクションのデフォルトでは、設定されたレイヤ 7 HTTP ディープ パケット インスペクションの一致項目のいずれにも一致しないトラフィックを許可します。この動作を変更するには、レイヤ 7 HTTP トラフィックが拒否されるように reset アクションを伴う class class-default コマンドを含めます。このようにすると、レイヤ 7 HTTP ディープ パケット インスペクション ポリシー マップに設定されたクラスの一致項目のいずれにも合致しなければ、ACE は class-default のアクションを実行します。たとえば、HTTP GET 方式を許可するクラス マップを含めて、 class class-default コマンドを使用すると、他のすべての要求をすべてブロックできます。
(注) デフォルトでは、どの一致も HTTP 要求メッセージと応答メッセージの両方に適用されますが、class class-default コマンドの場合は HTTP 要求にのみ適用されます。
ここでは、レイヤ 7 SCCP インスペクション ポリシー マップの設定方法について説明します。CLI のインターフェイスでは、SCCP は単に「skinny」と呼ばれます。この機能には、レイヤ 7 クラス マップは必要ありません。ACE では SCCP インスペクション ポリシーにより、メッセージ IDに基づいてトラフィックをフィルタし、このトラフィック上でユーザ設定の可能なアクションを実行します。
(注) レイヤ 4 ポリシー マップには、同じタイプの正規表現(regex)のインスタンスを最大で 1024 個関連付けることができます。この上限は Generic、HTTP、RADIUS、RDP、RTSP、SIP などの、レイヤ 7 ポリシー マップのすべてのタイプに適用されます。regex を設定する対象は次のとおりです。
• レイヤ 7 ポリシー マップのインライン match 文
• レイヤ 7 アクション リストのヘッダー挿入および書き換え(SSL URL 書き換えを含む)
• レイヤ 7 SCCP インスペクション ポリシー マップの作成
• レイヤ 7 SCCP インスペクション ポリシー マップへのデスクリプションの追加
• レイヤ 7 SCCP インスペクション ポリシー マップへのインライン match 文の追加
• レイヤ 7 SCCP インスペクション ポリシー マップ アクションの指定
コンフィギュレーション モードで policy-map type inspect skinny コマンドを使用すると、レイヤ 7 SCCP インスペクション ポリシー マップを作成することができます。このコマンドの構文は次のとおりです。
policy-map type inspect skinny name
map_name 引数は、ポリシー マップに割り当てられる名前です。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
たとえば、レイヤ 7 SCCP インスペクション ポリシー マップを作成するには、次のように入力します。
レイヤ 7 SCCP インスペクション ポリシー マップを設定から削除するには、次のように入力します。
ポリシー マップ インスペクションの Skinny コンフィギュレーション モードで description コマンドを使用すると、レイヤ 7 SCCP インスペクション ポリシー マップにデスクリプションを追加することができます。このコマンドの構文は次のとおりです。
設定からポリシー マップ デスクリプションを削除するには、次のように入力します。
トラフィック クラスを指定しなくても、ポリシー マップ インスペクションの Skinny コンフィギュレーション モードで match message-id コマンドを使用すると、ポリシー マップに 1 つのインライン一致基準を含めることができます。インライン match コマンドを使用する場合は、レイヤ 7 ポリシー マップに 1 つの match 文だけに対応したアクションを指定できます。
match name message-id { number1 {insert-before map_name } | range { number2 number3 }}
• name ― インライン match コマンドに割り当てる名前。スペースと引用符を使用しないテキスト文字列を入力します。インライン match 文の名前とそれに関連付けられるポリシー マップの名前の文字長の合計は、英数字で 64 文字を超えることはできません。たとえば、ポリシー マップの名前が L7_POLICY(9 文字)の場合、このポリシーでのインライン match 文の名前は英数字で 55 文字を超えることができません(64 - 9 = 55)。
• message-id ― SCCP StationMessageID を指定します。
• number1 ― SCCP メッセージの数値 ID。0 ~ 65535 の整数を入力します。
• insert-before map_name ― (任意)インライン match コマンドを、ポリシー マップ コンフィギュレーション内の既存クラス マップの前に配置します。
• range { number2 number3 } ― SCCP メッセージ ID の範囲を指定します。範囲の下限と上限を 0 ~ 65535 の整数で指定します。上限は下限より大きいか、下限と等しい値でなければなりません。
たとえば、インライン match コマンドをレイヤ 7 SCCP インスペクション ポリシー マップに追加するには、次のように入力します。
ポリシー マップからインライン match 文を削除するには、次のように入力します。
デフォルトでは、ACE はすべての SCCP パケットを通過させます。SCCP トラフィックを明示的にドロップする場合、指定の SCCP トラフィックがインライン match 文に一致していれば、ポリシー マップ アクションとして reset コマンドを使用します。ポリシー マップ インスペクションの Skinny マッチ コンフィギュレーション モードでは 1 つのインライン match コマンドに対して指定のアクションを適用します。
reset コマンドを実行すると、ACE は、インライン match コマンドに一致する SCCP トラフィックをドロップします。
たとえば、ACE で match message-id インライン コマンドに一致する SCCP トラフィックをドロップさせるには、次のように入力します。
レイヤ 7 SCCP インスペクション ポリシー マップのアクションをディセーブルにするには、次のように入力します。
ここではレイヤ 7 SIP インスペクション クラス マップとポリシー マップの設定方法について説明します。ACE ではクラス マップを使用することにより、着信側、発信側、コンテンツ タイプ、SIP URI など各種のパラメータに基づいて、SIP トラフィックをフィルタします。ACE は、ポリシー マップによって、指定のアクションに基づいて当該トラフィックの許可、または拒否を判断します。
(注) レイヤ 4 ポリシー マップには、同じタイプの正規表現(regex)のインスタンスを最大で 1024 個関連付けることができます。この上限は Generic、HTTP、RADIUS、RDP、RTSP、SIP などの、レイヤ 7 ポリシー マップのすべてのタイプに適用されます。regex を設定する対象は次のとおりです。
• レイヤ 7 ポリシー マップのインライン match 文
• レイヤ 7 アクション リストのヘッダー挿入および書き換え(SSL URL 書き換えを含む)
• レイヤ 7 SIP インスペクション クラス マップの設定
• レイヤ 7 SIP インスペクション ポリシー マップの設定
ここでは、SIP アプリケーション プロトコル インスペクションのためのレイヤ 7 クラス マップの設定方法について説明します。ここで説明する内容は次のとおりです。
• レイヤ 7 SIP インスペクション クラス マップの作成
• レイヤ 7 FTP インスペクション クラス マップ デスクリプションの追加
コンフィギュレーション モードで class-map type sip inspect コマンドを使用すると、レイヤ 7 SIP インスペクション クラス マップを作成することができます。
class-map type sip inspect [match-all | match-any] map_name
• match-all | match-any ― (任意)クラス マップ内に複数の一致基準が存在する場合に、ACE で SIP トラフィックのインスペクションの実行方法を指定します。 match コマンドが次のいずれかの条件と一致すると、クラス マップは一致したとみなされます。
– match-all ― (デフォルト)ネットワーク トラフィックがレイヤ 7 SIP インスペクション クラス マップと一致するには、すべての一致基準を満たす(暗黙的な AND)必要があります。 match-all キーワードは、異なるタイプの SIP インスペクションの match 文にのみ適用できます。たとえば、SIP URI、SIPヘッダー、および SIP コンテンツ文に対して match-all 条件を指定することは有効です。しかし、同じクラス マップ内に同じ名前または複数の URL を持つ複数の SIP ヘッダーに対して match-all 条件を指定することは無効です。
– match-any ― ネットワーク トラフィックがレイヤ 7 SIP インスペクション クラス マップに一致する場合は、満たすべき一致基準は 1 つだけです(暗黙的な OR)。 match-any キーワードは、同じタイプのレイヤ 7 SIP インスペクションの match 文にのみ適用できます。たとえば ACE では、同じクラス マップの中で SIP URI、SIP ヘッダー、および SIP コンテンツ文に対して match-any 条件を指定できます。また、各文の論理が合っている限り、同じクラス マップの中で複数の URL、複数の SIP ヘッダー、または複数の SIP コンテンツ文に対し match-any 条件を指定することもできます。たとえば、同じクラス マップの中で match uri sip length 文を 2 つ使用することはできませんが、1 つのクラス マップで match uri sip length と match uri tel length の文を 1 つずつ使用することはできます。
• map_name ― クラス マップに割り当てられる名前。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
CLI は、クラス マップ SIP インスペクション コンフィギュレーション モードを表示します。ACE で評価するためにトラフィックの SIP アプリケーション インスペクションを分類するには、次のコマンドを 1 つまたは複数含めてレイヤ 7 クラス マップの一致基準を設定します。
• match called-party ― 「SIP To ヘッダーでの着信側の定義」を参照してください。
• match calling-party ― 「SIP From ヘッダー中での発信者の定義」を参照してください。
• match content ― 「SIP コンテンツ チェックの定義」を参照してください。
• match im-subscriber ― 「SIP Instant Messaging サブスクライバの定義」を参照してください。
• match message-path ― 「SIP メッセージが通過するメッセージ パスの定義」を参照してください。
• match request-method ― 「SIP 要求方式の定義」を参照してください。
• match third-party-registration ― 「SIP パーティ登録エンティティの定義」を参照してください。
• match uri ― 「SIP URI チェックの定義」を参照してください。
クラス マップには複数の match コマンドを使用できます。
たとえば、クラス マップの名前として SIP_INSPECT_L7CLASS を指定し、レイヤ 7 SIP アプリケーション インスペクション クラス マップ中のすべてのコマンドが満たされた場合に ACE が一致を示すようにするには、次のように入力します。
ACEから SIP インスペクション クラス マップを削除するには、次のように入力します。
クラス マップ SIP インスペクション コンフィギュレーション モードで description コマンドを使用すると、レイヤ 7 クラス マップ デスクリプションを追加することができます。
text 引数には、引用符を含まない 240 文字の英数字のテキスト文字列を入力します。
クラス マップからデスクリプションを削除するには、次のように入力します。
SIP To ヘッダーの URI で指定されたとおり、着信側(着信者または宛先)に基づいて SIP トラフィックをフィルタできます。ACE では、フィールドの表示名、またはタグの部分は除外されます。着信側の基準で SIP トラフィックをフィルタする場合は、クラス マップ SIP インスペクション コンフィギュレーション モードで match called-party コマンドを使用します。
[ line_number ] match called-party expression
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号は match 文の優先順位や順番を意味するものではありません。
• expression ― To ヘッダーの URI 中にある着信者を識別する正規表現。1 ~ 255 の英数字を使用した正規表現を入力します。ACE は一致処理で正規表現をサポートしています。これらの表現は、 header-name: expression の形式でヘッダー マップ内に格納されます。ヘッダー表現にはスペースを使用できますが、エスケープ シーケンスまたは引用符が必要です。正規表現で使用できるようにサポートされている文字の一覧については、 表3-5 を参照してください。
(注) データ文字列を照合するときは、正規表現中でピリオド(.)と疑問符(?)はリテラルの意味を持たないことに注意してください。これらの記号を照合するときは角カッコ([ ])を使用します(たとえば www.xyz.com の場合は、www[.]xyz[.]com と入力)。また、バックスラッシュ(\)を使用してピリオド(.)や疑問符(?)をエスケープすることもできます。
たとえば、SIP To ヘッダー中の着信者を識別するには、次のように入力します。
クラス マップから match 文を削除するには、次のように入力します。
SIP From ヘッダーの URI で指定されたとおり、発信側(発信者、送信元)に基づいて SIP トラフィックをフィルタできます。ACE では、フィールドの表示名、またはタグの部分は除外されます。発信側の基準で SIP トラフィックをフィルタする場合は、クラス マップ SIP インスペクション コンフィギュレーション モードで match calling-party コマンドを使用します。
[ line_number ] match calling-party expression
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号は match 文の優先順位や順番を意味するものではありません。
• expression ― SIP From ヘッダーの URI 中にある発信者を識別する正規表現。1 ~ 255 の英数字を使用した正規表現を入力します。ACE は一致処理で正規表現をサポートしています。これらの表現は、 header-name: expression の形式でヘッダー マップ内に格納されます。ヘッダー表現にはスペースを使用できますが、エスケープ シーケンスまたは引用符が必要です。正規表現で使用できるようにサポートされている文字の一覧については、 表3-5 を参照してください。
(注) データ文字列を照合するときは、正規表現中でピリオド(.)と疑問符(?)はリテラルの意味を持たないことに注意してください。これらの記号を照合するときは角カッコ([ ])を使用します(たとえば www.xyz.com の場合は、www[.]xyz[.]com と入力)。また、バックスラッシュ(\)を使用してピリオド(.)や疑問符(?)をエスケープすることもできます。
たとえば、SIP From ヘッダー中の発信者を識別するには、次のように入力します。
クラス マップから match 文を削除するには、次のように入力します。
コンテンツの長さ、またはそのタイプに基づいて、SIP のコンテンツ チェックを実行するように ACE を設定できます。デフォルトでは、ACE はすべてのコンテンツ タイプを許可します。SIP コンテンツ チェックを定義するには、クラス マップ SIP インスペクション コンフィギュレーション モードで match content コマンドを使用します。
[ line_number ] match content {length gt number } | {type sdp | expression }
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号は match 文の優先順位や順番を意味するものではありません。
• length ― SIP メッセージ ボディの長さを指定します。
• number ― ACE で許可される SIP メッセージ ボディの最大サイズ。整数で 0 ~ 65534 バイトを入力します。メッセージ ボディが設定値より大きい場合、ACE は、ポリシー マップで設定するアクションを実行します。
• type ― コンテンツ タイプ チェックを指定します。
• sdp ― トラフィックが、クラス マップに一致する Session Description Protocol(SDP)のタイプであることを条件付けます。
• expression ― クラス マップに一致する SIP メッセージ ボディ中のコンテンツ タイプを識別する正規表現。1 ~ 255 の英数字を使用した正規表現を入力します。ACE は一致処理で正規表現をサポートしています。正規表現で使用できるようにサポートされている文字の一覧については、 表3-5 を参照してください。
(注) データ文字列を照合するときは、正規表現中でピリオド(.)と疑問符(?)はリテラルの意味を持たないことに注意してください。これらの記号を照合するときは角カッコ([ ])を使用します(たとえば www.xyz.com の場合は、www[.]xyz[.]com と入力)。また、バックスラッシュ(\)を使用してピリオド(.)や疑問符(?)をエスケープすることもできます。
たとえば、長さが 4000 バイトを超えるコンテンツを含む SIP パケットをドロップするように ACE を設定するには、次のように入力します。
クラス マップから match 文を削除するには、次のように入力します。
クラス マップ SIP インスペクション コンフィギュレーション モードで match im-subscriber コマンドを使用すると、IM サブスクライバを基準として SIP トラフィックをフィルタできます。このコマンドの構文は次のとおりです。
[ line_number ] match im-subscriber expression
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号は match 文の優先順位や順番を意味するものではありません。
• expression ― IM サブスクライバを識別する正規表現。1 ~ 255 の英数字を使用した正規表現を入力します。ACE は一致処理で正規表現をサポートしています。これらの表現は、 header-name: expression の形式でヘッダー マップ内に格納されます。ヘッダー表現にはスペースを使用できますが、エスケープ シーケンスまたは引用符が必要です。正規表現で使用できるようにサポートされている文字の一覧については、 表3-5 を参照してください。
(注) データ文字列を照合するときは、正規表現中でピリオド(.)と疑問符(?)はリテラルの意味を持たないことに注意してください。これらの記号を照合するときは角カッコ([ ])を使用します(たとえば www.xyz.com の場合は、www[.]xyz[.]com と入力)。また、バックスラッシュ(\)を使用してピリオド(.)や疑問符(?)をエスケープすることもできます。
クラス マップから match 文を削除するには、次のように入力します。
SIP インスペクションにより、特定の SIP プロキシ サーバから発信されたり、これを通過したりするメッセージをフィルタすることができます。ACE では、許可されていない SIP プロキシ の IP アドレス または URI のリストが、正規表現で保持されます。ACE は、このリストと各 SIP パケットの VIA ヘッダー フィールドを照合します。デフォルトでは、regex リストに一致する VIA フィールドを含む SIP パケットがドロップされます。
メッセージ パスの基準で SIP トラフィックをフィルタする場合は、クラス マップ SIP インスペクション コンフィギュレーション モードで match message-path コマンドを使用します。
[ line_number ] match message-path expression
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号は match 文の優先順位や順番を意味するものではありません。
• expression ― SIP プロキシ サーバを識別する正規表現。1 ~ 255 の英数字を使用した正規表現を入力します。ACE は一致処理で正規表現をサポートしています。これらの表現は、 header-name: expression の形式でヘッダー マップ内に格納されます。ヘッダー表現にはスペースを使用できますが、エスケープ シーケンスまたは引用符が必要です。正規表現で使用できるようにサポートされている文字の一覧については、 表3-5 を参照してください。
(注) データ文字列を照合するときは、正規表現中でピリオド(.)と疑問符(?)はリテラルの意味を持たないことに注意してください。これらの記号を照合するときは角カッコ([ ])を使用します(たとえば www.xyz.com の場合は、www[.]xyz[.]com と入力)。また、バックスラッシュ(\)を使用してピリオド(.)や疑問符(?)をエスケープすることもできます。
クラス マップから match 文を削除するには、次のように入力します。
クラス マップ SIP インスペクション コンフィギュレーション モードで match request-method コマンドを使用すると、要求方式を基準として SIP トラフィックをフィルタできます。
[ line_number ] match request-method method_name
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号は match 文の優先順位や順番を意味するものではありません。
• method_name ― 次のいずれかのキーワードを使用したサポート対象の SIP 方式
(注) 未知またはサポートされていない SIP 方式を許可/拒否するには、unknown キーワードを使用します。
たとえば、INVITE 要求方式を基準として SIP トラフィックをフィルタするには、次のように入力します。
クラス マップから match 文を削除するには、次のように入力します。
SIP を使用し、From や To のヘッダー フィールドに異なる値を指定した
REGISTER メッセージを送信することにより、別のユーザに代わって登録を行うことができます。このプロセスは、REGISTER メッセージが実際は DEREGISTER メッセージである場合に、セキュリティ上の脅威となり得ます。悪意あるユーザが、別のユーザになり代わって登録解除することにより、DoS 攻撃 (サービス拒絶攻撃)が行われる可能性があるからです。こうしたセキュリティ上の脅威を避けるために、登録の実行や解除を代行できる特権ユーザのリストを指定できます。ACE では、このリストが regex テーブルとして保持されます。このポリシーを設定すると、ACE では、From と To ヘッダーが一致しない REGISTER メッセージや、いずれの特権 ユーザ ID とも一致しない From ヘッダー値を含むメッセージがドロップされます。
第三者の登録、または登録解除に対して SIP トラフィックのフィルタリングを実行する場合は、クラス マップ SIP インスペクション コンフィギュレーション モードで match third-party-registration コマンドを使用します。このコマンドの構文は次のとおりです。
[ line_number ] match third-party-registration expression
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号は match 文の優先順位や順番を意味するものではありません。
• expression ― 第三者の登録が許可された特権ユーザ。1 ~ 255 の英数字を使用した正規表現を入力します。ACE は一致処理で正規表現をサポートしています。これらの表現は、 header-name: expression の形式でヘッダー マップ内に格納されます。ヘッダー表現にはスペースを使用できますが、エスケープ シーケンスまたは引用符が必要です。正規表現で使用できるようにサポートされている文字の一覧については、 表3-5 を参照してください。
(注) データ文字列を照合するときは、正規表現中でピリオド(.)と疑問符(?)はリテラルの意味を持たないことに注意してください。これらの記号を照合するときは角カッコ([ ])を使用します(たとえば www.xyz.com の場合は、www[.]xyz[.]com と入力)。また、バックスラッシュ(\)を使用してピリオド(.)や疑問符(?)をエスケープすることもできます。
たとえば、SIP の登録、または登録解除に対して SIP トラフィックにフィルタリングを実行するには、次のように入力します。
クラス マップから match 文を削除するには、次のように入力します。
SIP URI または Tel URI の長さを検証できるように、ACE を設定できます。SIP URI は、発信側(送信元)が着信側(宛先)に連絡を取るときに使用するユーザ ID です。Tel URI は、SIP 接続のエンドポイントを識別する電話番号です。SIP URI および Tel URI の詳細については、RFC 2534 および RFC 3966 の仕様を参照してください。
URI の基準で SIP トラフィックをフィルタする場合は、クラス マップ SIP インスペクション コンフィギュレーション モードで match uri コマンドを使用します。
[ line_number ] match uri {sip | tel} length gt value
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 1024 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号は match 文の優先順位や順番を意味するものではありません。
• sip ― ACEが SIP URI の長さを検証するように指定します。
• tel ― ACE が Tel URI の長さを検証するように指定します。
• length ― SIP または Tel URI の長さを指定します。
• value ― SIP URI または Tel URI の最大長(バイト)。0 ~ 254 の整数を入力します。
クラス マップから match 文を削除するには、次のように入力します。
ここでは、レイヤ 7 SIP インスペクション ポリシー マップの設定方法について説明します。レイヤ 7 ポリシー マップでは、クラス マップに定義された分類と一致するネットワーク トラフィックに対して実行する SIP インスペクションの適切なアクションを設定します。続いて、設定済みのレイヤ 7 SIP インスペクション ポリシーをレイヤ 3 およびレイヤ 4 ポリシー マップに関連付けて、VLAN インターフェイス上の動作をアクティブにします(「レイヤ 3 およびレイヤ 4 アプリケーション プロトコル インスペクションのポリシー アクションの設定」を参照してください)。
• レイヤ 7 SIP インスペクション ポリシー マップの設定
• レイヤ 7 SIP インスペクション ポリシー マップ デスクリプションの追加
• レイヤ 7 SIP インスペクション ポリシー マップへのインライン match 文の追加
コンフィギュレーション モードで policy-map type inspect sip コマンドを使用すると、レイヤ 7 SIP ポリシー マップを作成することができます。
policy-map type inspect sip all-match map_ name
• sip all-match ― ACE による SIP プロトコル パケットのインスペクションを開始するポリシー マップを指定します。ACE はすべての指定された条件を一致分類と照合し、すべての一致するクラスに対する一致処理を、一致要求が拒否されるまで行います。
• map_name ― ポリシー マップに割り当てられる名前。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
たとえば、レイヤ 7 SIP インスペクション ポリシー マップを作成するには、次のように入力します。
SIP インスペクション ポリシー マップを設定から削除するには、次のように入力します。
ポリシー マップ インスペクションの SIP コンフィギュレーション モードで description コマンドを使用すると、レイヤ 7 SIP インスペクション ポリシー マップにデスクリプションを設定することができます。
たとえば、レイヤ 7 SIP インスペクション ポリシー マップにデスクリプションを追加するには、次のように入力します。
ポリシー マップからデスクリプションを削除するには、次のように入力します。
トラフィック クラスを指定しなくても、適切なレイヤ 7 match コマンドを使用すると、ポリシー マップに 1 つのインライン一致基準を含めることができます。レイヤ 7 ポリシー マップのインライン match コマンドは、レイヤ 7 クラス マップの match コマンドと同じように機能します。ただし、インライン match コマンドを使用する場合は、レイヤ 7 ポリシー マップに 1 つの match 文だけに対応したアクションを指定できます。
(注) 複数の match 文に対応したアクションを指定するには、「レイヤ 7 SIP インスペクション クラス マップの設定」の説明に従ってクラス マップを使用してください。
match name match_statement [ insert-before map_name ]
• name ― インライン match コマンドに割り当てる名前。スペースと引用符を使用しないテキスト文字列を入力します。インライン match 文の名前とそれに関連付けられるポリシー マップの名前の文字長の合計は、英数字で 64 文字を超えることはできません。たとえば、ポリシー マップの名前が
L7_POLICY(9 文字)の場合、このポリシー下のインライン match 文の名前は英数字で 55 文字を超えることができません(64 - 9 = 55)。
• match_statement ― ポリシー マップが使用するインライン一致基準。レイヤ 7 SIP インスペクション クラス マップに関連付けられる match コマンドの詳細については、下記を参照してください。
• insert-before map_name ― (任意)インライン match コマンドを、ポリシー マップ コンフィギュレーション内の既存クラス マップの前に配置します。
レイヤ 7 SIP インスペクション ポリシー マップのインライン match コマンド構文は、次のとおりです。
match name called-party expression
match name calling-party expression
match name content {length gt number } | {type sdp | expression }
match name im-subscriber expression
match name message-path expression
match name request-method method_name
match name third-party-registration expression
match name uri {sip | tel} length gt value
各インライン match コマンドの詳細については、「レイヤ 7 SIP インスペクション クラス マップの設定」を参照してください。
たとえば、インライン match コマンドをレイヤ 7 SIP インスペクション ポリシー マップに追加するには、次のように入力します。
ポリシー マップからインライン match コマンドを削除するには、次のように入力します。
ポリシー マップ インスペクションの SIP コンフィギュレーション モードで class コマンドを使用すると、レイヤ 7 SIP インスペクション クラス マップをレイヤ 7 SIP インスペクション ポリシー マップに関連付けけることができます。
map_name 引数は、既存のレイヤ 7 SIP インスペクション クラス マップの識別子です。名前に、64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
たとえば、レイヤ 7 SIP インスペクション クラス マップをレイヤ 7 SIP インスペクション ポリシー マップに関連付けけるには、次のように入力します。
host/Admin(config-pmap-ins-sip)# class SIP_INSPECT_L7CLASS
host/Admin(config-pmap-ins-sip-c)#
ポリシー マップとクラス マップの関連付けを解除するには、次のように入力します。
host/Admin(config-pmap-ins-sip)# no class SIP_INSPECT_L7CLASS
デフォルトでは、ACE はすべての SIP パケットを通過させます。特定の SIP コマンドを明示的に拒否するには、指定した SIP トラフィックが分類と一致した場合のアクションとして次のコマンドのいずれかを使用します。ポリシー マップ SIP インスペクション マッチ コンフィギュレーション モードでの 1 つのインライン match コマンド、またはポリシー マップ SIP インスペクション クラス コンフィギュレーション モードの特定のクラス マップに対して、指定したアクションを適用します。
{{ drop | permit | reset } [ log ]} | log
• drop ― クラス マップ、または 1 つのインライン match コマンドに一致する SIP パケットをドロップします。
• permit ― (デフォルト)クラス マップ、または 1 つのインライン match コマンドに一致する SIP トラフィックが ACE を通過できるようにします。
• reset ― クラス マップ、または 1 つ のインライン match コマンドに一致する SIP トラフィックを拒否し、TCP RESET メッセージにより接続をリセットします。
• log ― クラス マップ、または 1 つのインライン match コマンドに一致するトラフィックについてログ メッセージを生成します。
たとえば、関連するレイヤ 7 SIP インスペクション クラス マップに一致するトラフィックについてレイヤ 7 SIP インスペクション ポリシー マップのアクションを指定するには、次のように入力します。
また 1 つのインライン match コマンドに一致するトラフィックについてレイヤ 7 SIP インスペクション ポリシー マップでアクションを指定するには、次のように入力します。
レイヤ 7 SIP インスペクション ポリシー マップのアクションをディセーブルにするには、次のように入力します。
ここでは、レイヤ 3 および 4 のクラス マップとポリシー マップを作成して ACE を通過するネットワーク トラフィックを分類し、このトラフィックに対するアプリケーション プロトコル インスペクション アクションを実行する方法について説明します。レイヤ 3 およびレイヤ 4 トラフィック ポリシーには、レイヤ 3 およびレイヤ 4 HTTP ディープ パケット インスペクション、FTP コマンド インスペクション、またはアプリケーション プロトコル インスペクションのポリシー アクションを定義します。アプリケーション インスペクションでは、プロトコルの動作確認および ACE を通過する不要なトラフィックまたは悪意のあるトラフィックを識別するために、DNS、FTP、 HTTP、ICMP、ILS、RTSP、SCCP、SIP などのプロトコルを確認する必要があります。
• インスペクション トラフィック ポリシーの設定ガイドライン
バージョン A2(1.0) の ACE ソフトウェアでは、アプリケーション プロトコル インスペクションのための厳密なエラー チェックが実行されるため、インスペクションの設定が、ここで説明するガイドラインに適合していることを確認してください。ソフトウェアでのエラー チェックにより、インスペクション分類(クラス マップ)での設定ミスは拒否され、該当するエラー メッセージが表示されます。ソフトウェアをロードする前に、スタートアップ コンフィギュレーション ファイルや実行コンフィギュレーション ファイルに設定の誤りがあると、冗長構成中のスタンバイ ACE が開始して STANDBY_COLD が起動することがあります。冗長状態の詳細については『 Cisco Application Control Engine Module Administration Guide 』を参照してください。
インスペクション以外のトラフィックも一致させるように、インスペクション トラフィックのクラス マップを match . . . any または class-default で汎用的に設定すると、ACE ではエラー メッセージが表示され、インスペクション設定は拒否されます。例を示します。
以下の例は、インスペクション設定には認められない汎用的なクラス マップ の match 文および ACL の例を示したものです。
• match port tcp range 0 65535
• match port udp range 0 65535
• match virtual-address 192.168.12.15 255.255.255.0 any
• match virtual-address 192.168.12.15 255.255.255.0 tcp any
• access-list acl1 line 10 extended permit ip any any
アプリケーション プロトコル インスペクションの場合、クラス マップでは、特定のプロトコル(インスペクション タイプに対応するプロトコル)と、特定のポート、またはポート範囲が設定されていなければなりません。
HTTP、FTP、RTSP、Skinny、および ILS のプロトコル インスペクションについては、クラス マップにプロトコル、および特定のポートまたはポート範囲が TCP に設定されている必要があります。たとえば、次のコマンドを入力します。
また、SIP プロトコル インスペクションの場合、クラス マップには、特定のポートまたはポート範囲が TCP または UDP に設定されていなければなりません。たとえば、次のコマンドを入力します。
DNS インスペクションの場合、クラス マップには、特定のポートまたはポート範囲が UDP に設定されている必要があります。たとえば、次のコマンドを入力します。
ICMP プロトコル インスペクションの場合、クラス マップには、ICMP の設定が必要になります。たとえば、次のコマンドを入力します。
コンフィギュレーション モードで class-map コマンドを使用すると、レイヤ 3 およびレイヤ 4 クラス マップを作成して ACE を通過するネットワーク トラフィックを分類し、アプリケーション プロトコル インスペクションの適切なポリシーを実行できます。
1 つのクラス マップに複数の match コマンドを使用して一致基準を指定できます。たとえば、複数のアクセス グループ コマンドまたはポート コマンドをグループ化して定義するようにクラス マップを設定したあと、アプリケーション プロトコル インスペクション ポリシーに関連付けることができます。クラス マップ内に複数の一致基準が存在する場合、 match-all および match-any キーワードで ACE による複数の match 文の評価方法を指定します。
class-map [ match-all | match-any ] map_name
• match-all | match-any ― (任意)クラス マップ内に複数の一致基準が存在する場合に、レイヤ 3 およびレイヤ 4 ネットワーク トラフィックの評価方法を指定します。 match コマンドが次の条件のいずれかを満たす場合、クラス マップは一致とみなされます。
– match-all ― (デフォルト)クラス マップ内のすべての一致基準を満足すると、そのクラス マップのネットワーク トラフィック クラスと一致します。通常はタイプの異なる match コマンドです。
– match-any ― クラス マップ内の一致基準の 1 つでも満足すると、そのクラス マップのネットワーク トラフィック クラスと一致します。通常は同じタイプの match コマンドです。
• map_name ― クラス マップに割り当てられる名前。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
CLI は、クラス マップ コンフィギュレーション モードを表示します。ACE を通過するネットワーク トラフィックをアプリケーション プロトコル インスペクションの対象に分類するには、次のコマンドを 1 つまたは複数含めてクラス マップの一致基準を設定します。
• description ― 「レイヤ 3 およびレイヤ 4 クラス マップ デスクリプションの追加」を参照してください。
• match access-list ― 「アクセス リストの一致基準の定義」を参照してください。
• match port ― 「TCP/UDP ポート番号またはポート範囲の一致基準の定義」を参照してください。
クラス マップを作成してレイヤ 3 およびレイヤ 4 の一致分類を定義する場合は、次のガイドラインに従ってください。
• クラス マップには match access-list コマンドと match port コマンドを複数組み合わせることができます。
• 一致するトラフィックは、ポリシー マップに指定される個々の inspect コマンドに依存します。IP プロトコルおよびポートを含めた、ACE によってサポートされるアプリケーション プロトコル インスペクション プロトコルの概要については、 表3-1 を参照してください。
たとえば、レイヤ 3 およびレイヤ 4 クラス マップを定義するには、次のように入力します。
ACE からレイヤ 3 およびレイヤ 4 ネットワーク トラフィックのクラス マップを削除するには、次のように入力します。
description コマンドを使用すると、レイヤ 3 およびレイヤ 4 クラス マップの簡単な概要を記述できます。 description コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
text 引数には、引用符を含まない 240 文字までの英数字のテキスト文字列を入力します。
たとえば、DNS アプリケーション プロトコル インスペクションを実行するためのクラス マップであることを説明するには、次のように入力します。
クラス マップから説明を削除するには、次のように入力します。
match access-list コマンドを使用すると、レイヤ 3 およびレイヤ 4 ネットワーク トラフィックを既定のアクセス コントロール リストでフロー単位にフィルタリングするように、クラス マップを設定できます。パケットがアクセス リストのエントリと一致し、そのエントリが permit の場合、一致結果は許可されます。エントリが deny の場合、一致結果はブロックされます。ACE にアクセス コントロール リストを作成する詳細については、 第 1 章「セキュリティ アクセス コントロール リストの設定」 を参照してください。
アプリケーション プロトコル インスペクションの場合、アクセス リストでは、ACL エントリで IP アドレスと ポートを明示的に指定する必要があります。この指定がないと、ACE によりエラー メッセージが表示されます。
match access-list コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match access-list identifier
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 255 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• identifier ― 以前作成されたアクセス リストの識別子。引用符を使用しない 64 文字までのテキスト文字列を入力します。
1 つのクラス マップに複数の match access-list コマンドを入力できます。クラス マップには match access-list コマンドと match port コマンドを複数組み合わせることができます。
たとえば、アクセス コントロール リスト INBOUND_ACL1 と一致するようにクラス マップを指定するには、次のように入力します。
クラス マップからアクセス コントロール リストの一致基準を削除するには、次のように入力します。
match port コマンドを使用すると、TCP/UDP ポート番号またはポート範囲を、レイヤ 3 およびレイヤ 4 ネットワーク トラフィック一致基準として指定できます。
match port コマンドを指定するには、クラス マップ コンフィギュレーション モードにアクセスする必要があります。
[ line_number ] match port { tcp | udp } { any | eq { port_number } | range port1 port2 }
• line_number ― (任意)個別の match コマンドを編集または削除するのに役立つ引数。行番号には 2 ~ 255 の範囲の整数を入力します。長い match コマンドを削除する場合は、行全体を入力しなくても、 no line_number と入力することで削除できます。行番号が match 文の優先順位や順番を意味することはありません。
• tcp | udp ― TCP または UDP プロトコルを次のように指定します。
– any ― TCP/UDP ポート番号のワイルドカード値を指定します。 eq または range の値の代わりに any を使用した場合、すべての着信ポートのパケットが一致します。
– eq port_number ― TCP/UDP ポート番号が指定した値と一致することを指定します。0 ~ 65535 の範囲の整数を入力します。ゼロ(0)の値はすべてのポートを含むことを ACE に指示します。このほかに、 表3-7 に示す Well-known TCP ポートまたは 表3-8 に示す Well-known UDP ポートの名前を入力できます。
– range port1 port2 ― 使用する TCP/UDP ポートのポート範囲を指定します。使用できるポートの範囲は 0 ~ 65535 です。ゼロ(0)の値はすべてのポートと一致することを ACE に指示します。
|
|
|
---|---|---|
|
|
|
---|---|---|
1 つのクラス マップに複数の match port コマンドを入力できます。クラス マップには match access-list コマンドと match port コマンドを複数組み合わせることができます。
たとえば、ポート番号 23(Telnet クライアント)と一致するようにクラス マップを指定するには、次のように入力します。
クラス マップから TCP/UDP ポート番号の一致基準を削除するには、次のように入力します。
ここでは、HTTP ディープ パケット インスペクション、FTP コマンド インスペクション、またはアプリケーション プロトコル インスペクションのトラフィック ポリシーを定義しているレイヤ 3 およびレイヤ 4 ポリシーの設定方法について説明します。
• レイヤ 3 およびレイヤ 4 ポリシー マップ デスクリプションの追加
policy-map multi-match コンフィギュレーション コマンドを使用すると、アプリケーション インスペクション ポリシーを定義しているレイヤ 3 およびレイヤ 4 ポリシー マップを設定できます。ACE はレイヤ 3 およびレイヤ 4 ポリシー マップ内の複数のクラスと一致するか試行しますが、トラフィック クラスの各セット内の 1 つのクラスとだけ一致できます。1 つの分類が複数のクラス マップと一致する場合には、ACE は対応するすべてのアクションを実行します。ただし、特定の機能に対しては、ACE は最初に一致した分類アクションのみを実行します。
policy-map multi-match map_name
map_name 引数は、ポリシー マップに割り当てられる名前です。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
たとえば、レイヤ 3 およびレイヤ 4 ネットワーク ポリシー マップを作成するには、次のように入力します。
CLI は、ポリシー マップ コンフィギュレーション モードを表示します。
ACE からレイヤ 3 およびレイヤ 4 ポリシー マップを削除するには、次のように入力します。
description コマンドを使用すると、レイヤ 3 およびレイヤ 4 ポリシー マップの簡単な概要を記述できます。 description コマンドを指定するには、ポリシー マップ コンフィギュレーション モードにアクセスする必要があります。
text 引数には、引用符を含まない 240 文字の英数字のテキスト文字列を入力します。
たとえば、DNS アプリケーション プロトコル インスペクションを実行するためのポリシー マップであることを説明するには、次のように入力します。
ポリシー マップから説明を削除するには、次のように入力します。
class コマンドを使用すると、 class-map コマンドで作成されたトラフィック クラスを指定してネットワーク トラフィックをトラフィック ポリシーに関連付けることができます。
map _name 引数は、トラフィックをトラフィック ポリシーに関連付けるために class-map コマンドを使用して設定した、すでに定義済みのトラフィック クラスの名前です。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
CLI は、ポリシー マップ クラス コンフィギュレーション モードを表示します。
たとえば、レイヤ 3 およびレイヤ 4 ポリシー マップ内に既存のクラス マップを指定するには、次のように入力します。
レイヤ 3 およびレイヤ 4 ポリシー マップからクラス マップを削除するには、次のように入力します。
以前に指定したクラス マップの前方の位置にクラス マップを手動で挿入するには、 insert-before コマンドを使用します。ACE は、 insert-before コマンドによる並び替えをコンフィギュレーションの一部として保存しません。
class map_name1 insert-before map_name2
• class map_name1 ― class-map コマンドを使用して定義したトラフィック クラスの名前を指定します。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
• insert-before map_name2 ― 現在のクラス マップを map_name2 引数で示された既存のクラス マップの前方に配置します。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
たとえば、 insert-before コマンドを使用して、ポリシー マップ内の 2 つのクラス マップの順番を定義するには、次のように入力します。
レイヤ 3 およびレイヤ 4 トラフィック ポリシーに対応する class-default クラス マップを指定するには、 class class-default コマンドを使用します。指定されたクラス マップ内の他の一致基準と一致しないネットワーク トラフィックは、すべてデフォルト トラフィック クラスに属します。ACE は、指定された分類のいずれも一致しない場合、 class class-default コマンド下の指定されたアクションと一致させます。 class-default クラス マップには、すべてのトラフィックと一致するにように、暗黙的に match any 文が含まれています。
たとえば、 class class-default コマンドを使用するには、次のように入力します。
ポリシー マップ クラス コンフィギュレーション モードで inspect コマンドを使用すると、レイヤ 3 およびレイヤ 4 HTTP ディープ パケット インスペクション、FTP コマンド インスペクション、またはアプリケーション プロトコル インスペクションのポリシー アクションを定義できます。アプリケーション インスペクションでは、プロトコルの動作確認および ACE を通過する不要なトラフィックまたは悪意のあるトラフィックを識別するために、DNS、FTP、 HTTP、ICMP、ILS、RTSP、SCCP、SIP などのプロトコルを確認する必要があります。
ネットワーク トラフィックのレイヤ 7 アプリケーション インスペクションを実行させる場合には、最初に次のようにしてレイヤ 7 ポリシーを作成します。
• ACE によって、レイヤ 7 HTTP アプリケーション トラフィックのディープ パケット インスペクションを実行するには、最初に policy-map type inspect http コマンドを使用してレイヤ 7 ポリシーを作成します(「レイヤ 7 HTTP ディープ インスペクション ポリシー マップの設定」を参照)。レイヤ 7 HTTP インスペクション ポリシーは、レイヤ 3 およびレイヤ 4 inspect http コマンドを使用して入れ子にします。
• FTP 要求コマンド インスペクションを実行するには、最初に policy-map type inspect ftp コマンドを使用してレイヤ 7 ポリシーを作成します(「レイヤ 7 FTP コマンド インスペクション ポリシー マップの設定」を参照)。レイヤ 7 FTP インスペクション ポリシーは、レイヤ 3 およびレイヤ 4 inspect ftp コマンドを使用して入れ子にします。
レイヤ 7 ポリシー マップを適切なレイヤ 3 およびレイヤ 4 ポリシー マップ内に関連付けて、トラフィック分類のエントリ ポイントを提供します。レイヤ 7 ポリシー マップは子ポリシーとみなされるので、レイヤ 3 およびレイヤ 4 ポリシー マップ内にのみ関連付けることができます。1 つの VLAN インターフェイスまたはグローバルに同じコンテキストのすべての VLAN インターフェイスに適用できるのは、レイヤ 3 およびレイヤ 4 ポリシー マップだけです。レイヤ 7 ポリシー マップをインターフェイスに直接適用することはできません。
(注) レイヤ 7 HTTP ポリシー マップまたは FTP ポリシー マップを指定しなかった場合、ACE はレイヤ 3 およびレイヤ 4 HTTP プロトコルまたは FTP プロトコルのフィックスアップ アクションの基本セットを実行します。たとえば、ACE は strict HTTP を実行します。
inspect dns [ maximum-length bytes ]
inspect ftp [ strict policy name1 | sec-param conn_parammap_name1 ]
inspect http [ policy name4 | url-logging ]
inspect rtsp [sec-param conn_parammap_name3 ]
inspect sip [sec-param conn_parammap_name4 ] [ policy name5 ]
inspect skinny [sec-param conn_parammap_name5 ] [ policy name6 ]
• dns ― DNS クエリー インスペクションをイネーブルにします。DNS クエリーがアクティビティ タイムアウトに基づく汎用 UDP 処理の対象とならないように、DNS にはアプリケーション インスペクションが必要です。適用すると、DNS クエリーと DNS 応答に関連付けられている UDP の接続は、DNS 応答を受信するとすぐに切断されます。ACE は DNS パケットの再構成を実行して、パケット長が既定の最大長未満であることを確認します。
maximum-length bytes ― (任意)DNS 応答の最大長を設定します。有効な範囲は 512 ~ 65536 バイトです。デフォルトはありません。最大長の値が設定されていないと、ACE は、DNS サーバからの応答サイズをチェックしません。
• ftp ― FTP インスペクションをイネーブルにします。ACE は FTP パケットを検査し、ペイロードに埋め込まれたアドレスとポートを変換し、データのセカンダリ チャネルを開きます。
– strict ― (任意)プロトコルが RFC に準拠しているかどうかをチェックし、ブラウザが FTP 要求の中にコマンドを埋め込んで送信することを防止します。 strict キーワードは、FTP クライアントが FTP サーバ上でサポートされているユーザ名を確認することを防止します。FTP サーバが USER コマンドに応答した場合、ACE は FTP サーバからの 530 応答コードを代行受信し、それを 331 応答コードに置き換えます。FTP インスペクション ポリシーを指定することでコマンドを選択してフィルタリングできるとともに、FTP クライアントに FTP サーバのシステム タイプを表示することを防止できます。ACE は SYST コマンドに対する FTP サーバの 215 応答コードとメッセージを代行受信し、応答コードに続くテキストをアスタリスクに置き換えます。
– sec-param conn_parammap_name1 ― (任意)FTP インスペクションのパラメータ定義に使用する作成済みの接続パラメータ マップの名前を指定します。
(注) レイヤ 7 ポリシー マップを指定しない場合、ACE はレイヤ 3 およびレイヤ 4 FTP プロトコルのフィックスアップ アクションの基本セットを実行します。
– policy name1 ― (任意)以前に作成したレイヤ 7 FTP コマンド インスペクション ポリシー マップに割り当てた名前を指定して、ACE によるレイヤ 7 FTP コマンド インスペクションを実装します。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。FTP コマンド要求インスペクション ポリシーを定義するには、ポリシー マップ クラス コンフィギュレーション モードで inspect ftp コマンドを使用します。
• http ― HTTP トラフィックに対する拡張 HTTP インスペクションをイネーブルにします。デフォルトでは、ACE はすべての要求方式を許可します。
– policy name4 ― (任意)以前に作成したレイヤ 7 HTTP アプリケーション インスペクション ポリシー マップに割り当てた名前を指定して、ACE によるレイヤ 7 HTTP アプリケーション トラフィックのディープ パケット インスペクションを実装します。インスペクション チェックは、既存のレイヤ 7 ポリシー マップの設定パラメータおよび ACE により実行される内部の RFC 準拠性チェックに基づいて行われます。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
(注) レイヤ 7 ポリシー マップを指定しなかった場合、ACE はレイヤ 3 およびレイヤ 4 HTTP のフィックスアップ アクションの基本セットと内部の RFC 準拠性チェックを実行します。
– url-logging ― (任意)レイヤ 3 およびレイヤ 4 トラフィックのモニタリングをイネーブルにします。この機能では、指定したクラスのトラフィックで送信されるすべての URL 要求(発信元/宛先 IP アドレスおよびアクセスされる URL を含む)をログに記録します。
• icmp ― ICMP ペイロード インスペクションをイネーブルにします。ICMP インスペクションでは、TCP および UDP トラフィックと同様の検査を行えるように、ICMP トラフィックに「セッション」を持たせることができます。
• error ― (任意)ICMP エラー メッセージの NAT を実行します。ACE は NAT の設定に基づいて、ICMP エラー メッセージを送信する中間ノードまたはエンドポイント ノード用の変換セッションを作成します。ACE は変換した IP アドレスでパケットを上書きします。
• ils ― Internet Locator Service(ILS)プロトコル インスペクションをイネーブルにします。
• rtsp ― RTSP パケット インスペクションをイネーブルにします。RTSP は RealAudio、RealNetworks、Apple QuickTime 4、RealPlayer、および Cisco IP/TV の接続に使用されます。ACE は、TCP ポート 554(UDP サポートなし)を使用して確立された制御チャネルのセットアップ メッセージおよび応答(200 OK)メッセージを監視します。
• sec-param conn_parammap_name3 ― (任意)RTSP インスペクションのパラメータ定義に使用する作成済みの接続パラメータ マップの名前を指定します。
• sip ― Session Initiation Protocol(SIP)インスペクションをイネーブルにします。SIP は、呼処理セッション、およびインスタント メッセージングに使用します。ACE は、メディアの接続アドレス、メディア ポート、および初期接続に対するシグナリング メッセージを検査します。ACE では、パケットのユーザ データ部分に埋め込まれた IP アドレスのネットワーク アドレス変換(NAT)も行います。
– sec-param conn_parammap_name4 ― (任意)SIP インスペクションのパラメータ定義に使用する作成済みの接続パラメータ マップの名前を指定します。
– policy name5 ― (任意)作成済みのレイヤ 7 SIP アプリケーション インスペクション ポリシー マップに割り当てた名前を指定して、レイヤ 7 SIP アプリケーション トラフィックのパケット インスペクションを ACE で実装します。インスペクション チェックは、既存のレイヤ 7 ポリシー マップの設定パラメータおよび ACE により実行される内部の RFC 準拠性チェックに基づいて行われます。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
(注) レイヤ 7 ポリシー マップを指定しなかった場合、ACE は レイヤ 3 およびレイヤ 4 SIP フィックスアップ アクションの基本セットと内部の RFC 準拠性チェックを実行します。
• skinny ― Cisco Skinny Client Control Protocol(SCCP)をイネーブルにします。SCCP は Cisco CallManager と Cisco VoIP Phoneの間で使用するシスコ独自のプロトコルです。ACE は SCCP パケット データに埋め込まれた IP アドレスと ポート番号を対象に NAT を実行します。
– policy name6 ― (任意)作成済みのレイヤ 7 SCCP アプリケーション トラフィックのディープ パケット インスペクションの名前を ACE で指定します。インスペクション チェックは、既存のレイヤ 7 ポリシー マップの設定パラメータおよび ACE により実行される内部の RFC 準拠性チェックに基づいて行われます。64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
(注) レイヤ 7 ポリシー マップを指定しなかった場合、ACE は レイヤ 3 およびレイヤ 4 SCCP フィックスアップ アクションの基本セットと内部の RFC 準拠性チェックを実行します。
– sec-param conn_parammap_name5 ― (任意)SCCP インスペクションのパラメータ定義に使用する作成済みの接続パラメータ マップの名前を指定します。
たとえば、HTTP アプリケーション プロトコル インスペクション ポリシー マップのアクションとして inspect http コマンドを指定するには、次のように入力します。
たとえば、DNS アプリケーション プロトコル インスペクション ポリシー マップのアクションとして inspect dns コマンドを指定するには、次のように入力します。
たとえば、FTP コマンド インスペクション ポリシー マップのアクションとして inspect ftp コマンドを指定するには、次のように入力します。
ポリシー マップからアプリケーション プロトコル インスペクションのアクションをディセーブルにするには、次のように入力します。
パラメータ マップを使用して、レイヤ 3 とレイヤ 4 の DNS インスペクション ポリシー マップにアクションを適用することができます。このパラメータ マップはポリシー マップ クラス コンフィギュレーション モードの appl-parameter コマンドで参照します。「DNS パラメータ マップとレイヤ 3 およびレイヤ 4 ポリシー マップの関連付け」を参照してください。
DNS パケット インスペクションの DNS アクションは、コンフィギュレーション モードで parameter-map type dns コマンドを使用して設定できます。このコマンドの構文は次のとおりです。
name 引数は、パラメータ マップに割り当てられた識別子です。32 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
たとえば、DNS_PARAMMAP というパラメータ マップを作成するには、次のコマンドを入力します。
DNS パラメータ マップを設定から削除するには、次のコマンドを入力します。
• DNS パラメータ マップとレイヤ 3 およびレイヤ 4 ポリシー マップの関連付け
レイヤ 4 ポリシー マップ アクションとして inspect dns コマンドにより DNS インスペクションをイネーブルにすると(「レイヤ 3 およびレイヤ 4 アプリケーション プロトコル インスペクションのポリシー アクションの設定」を参照)、ACE には、ハッシュ テーブルの形式でクライアントから送信される DNS クエリーが保存されます。ACE は、DNS サーバから応答を受け取ると、テーブル上に対応するクエリーが存在すれば、クライアントにサーバ応答を転送し、そのあとテーブルからエントリを削除します。ACE が応答を受け取っていないクエリーは、タイムアウトになるまでテーブルに保持されます。ACE には、サーバがダウンしている、クエリーがスプーフィングされているといった理由で、DNS クエリーに対する応答が送信されない場合があります。
UDP 接続がタイムアウトになると、ACE は 2 秒後に当該の UDP 接続をしている DNS クエリー ハッシュ エントリをすべて削除します。接続パラメータ マップを使用して、UDP 無活動タイムアウトを設定できます。詳細については、 第 4 章「TCP/IP 正規化パラメータおよび IP 再構成パラメータの設定」 を参照してください。
ACE が同じ UDP 接続から引き続き DNS クエリーを受け取っている場合、UDP 接続はタイムアウトにはなりません。この場合、応答のないクエリーは、10 秒後にタイムアウトになります。タイムアウト値を変更するには、DNS パラメータ マップ コンフィギュレーション モードで timeout query コマンドを使用します。このコマンドの構文は次のとおりです。
number 引数は、応答のないクエリー エントリがタイムアウトになるまでに、ACE がハッシュ テーブルに保持しておく時間を秒単位で指定します。整数で 2 ~ 120 秒を入力します。デフォルトは 10 秒です。
たとえば、応答のない DNS クエリーを 20 秒後にタイムアウトさせるには、次のコマンドを入力します。
クエリー タイムアウトをデフォルト値の 10 秒に戻すには、次のように入力します。
ポリシー マップ クラス コンフィギュレーション モードで appl-parameter dns advanced-options コマンドを使用すると、DNS パラメータ マップをレイヤ 3 およびレイヤ 4 ポリシー マップに関連付けることができます。
appl-parameter dns advanced-options name
name 引数は、既存の DNS パラメータ マップの名前です。パラメータ マップには DNS トラフィック関連のアクションが集約されています。既存の DNS パラメータ マップの名前に、64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。DNS パラメータ マップの設定に関する詳細については、「DNS パラメータ マップの設定」を参照してください。
たとえば、DNS_PARAMMAP DNS パラメータ マップを L4_POLICY レイヤ 3 とレイヤ 4 のポリシー マップに関連付けるには、次のように入力します。
レイヤ 4 ポリシー マップから DNS パラメータ マップの関連付けを解除するには、次のコマンドを入力します。
パラメータ マップを関連するアクションを組み合わせて、レイヤ 3 およびレイヤ 4 HTTP ディープ パケット インスペクション ポリシー マップで使用することができます。このパラメータ マップはポリシー マップ クラス コンフィギュレーション モードの appl-parameter コマンドで参照します。「HTTP パラメータ マップとレイヤ 3 およびレイヤ 4 ポリシー マップの関連付け」を参照してください。
HTTP ディープ パケット インスペクションの HTTP 拡張動作は、コンフィギュレーション モードで parameter-map type http を使用して設定できます。このコマンドの構文は次のとおりです。
name 引数は、パラメータ マップに割り当てられた識別子です。32 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
ここでは、HTTP 拡張パラメータ マップを定義する次の内容について説明します。
• HTTP パラメータ マップとレイヤ 3 およびレイヤ 4 ポリシー マップの関連付け
デフォルトでは、ACE の CLI は大文字と小文字を区別します。この区別による一致を HTTP の場合にのみディセーブルにするには、HTTP パラメータ マップ コンフィギュレーション モードで case-insensitive コマンドを使用します。
case-insensitive による一致がイネーブルになっていると、CLI は大文字と小文字を区別しません。大文字と小文字の区別がディセーブルにされた場合、それが適用される対象は次のとおりです。
たとえば、大文字と小文字の区別をディセーブルにするには、次のように入力します。
大文字と小文字の区別による一致をディセーブルにしたあと再度イネーブルにするには、次のように入力します。
HTTP パラメータ マップ コンフィギュレーション モードで
set header-maxparse-length コマンドを使用すると、解析する HTTP ヘッダーの最大バイト数を設定できます。このコマンドの構文は次のとおりです。
set header-maxparse-length bytes
bytes 引数は、解析する HTTP ヘッダーの最大バイト数です。1 ~ 65535 の範囲の整数を入力します。デフォルトは 2048 バイトです。
たとえば、HTTP ヘッダーの最大解析長を 8192 に設定するには、次のように入力します。
HTTP ヘッダー 最大解析長をデフォルトの 2048 バイトにリセットするには、次のように入力します。
HTTP パラメータ マップ コンフィギュレーション モードで
set content-maxparse-length コマンドを使用すると、解析する HTTP コンテンツの最大バイト数を設定できます。このコマンドの構文は次のとおりです。
set content-maxparse-length bytes
bytes 引数は、解析する HTTP コンテンツの最大バイト数です。1 ~ 65535 の範囲の整数を入力します。デフォルトは 4096 バイトです。
たとえば、最大解析長を 8192 に設定するには、次のように入力します。
最大解析長をデフォルトの 4096 バイトにリセットするには、次のように入力します。
ポリシー マップ クラス コンフィギュレーション モードで appl-parameter http advanced-options コマンドを使用すると、HTTP パラメータ マップをレイヤ 3 およびレイヤ 4 ポリシー マップに関連付けることができます。
appl-parameter http advanced-options name
name 引数は、既存の HTTP パラメータ マップの名前です。パラメータ マップには HTTP トラフィック関連のアクションが集約されています。既存の HTTP パラメータ マップの名前に、64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。HTTP パラメータ マップの設定に関する詳細については、「HTTP パラメータ マップの設定」を参照してください。
たとえば、 appl-parameter http advanced-options コマンドを HTTP ディープ パケット インスペクション ポリシー マップのアクションとして指定するには、次のように入力します。
HTTP ディープ パケット インスペクション ポリシー マップから、HTTP パラメータ マップのアクションとしての関連付けを解除するには、次のように入力します。
パラメータ マップは、関連するアクションを組み合わせて、レイヤ 3 およびレイヤ 4 の Skinny Client Control Protocol(SCCP)アプリケーション プロトコル インスペクション ポリシー マップで使用することができます。このパラメータ マップはポリシー マップ クラス コンフィギュレーション モードの
appl-parameter コマンドで参照します。「SCCP パラメータ マップとレイヤ 3 およびレイヤ 4 ポリシー マップの関連付け」を参照してください。
• SCCP インスペクション コンフィギュレーションの注意事項
• SCCP パラメータ マップとレイヤ 3 およびレイヤ 4 ポリシー マップの関連付け
ACE で SCCP インスペクションを設定するときは、次の点に注意してください。
• ACE が Cisco CallManager(CCM)と IP Phone の間に存在する場合、ACE は TFTP のフィックスアップがサポートしないため、CCM とフォンの間の TFTP トラフィックを許可する明示的なセキュリティ ACL が必要になります。
• 内部 CCM の IP アドレスが、別の IP アドレスまたはポートに対して NAT や PAT に設定されている場合、ACE は TFTP を介して転送するファイル コンテンツについて NAT や PAT をサポートしないため、外部の Cisco IP Phone の登録は失敗します。ACE は、TFTP メッセージの NAT はサポートしますが、TFTP のセキュア ポートはオープンしません。また、ACE は、Cisco IP Phone 設定ファイルに埋め込まれた CCM の IP アドレスおよびポートは変換しません。フォンの登録中に、設定ファイルは TFTP により転送されます。
SCCP パケット インスペクションは、コンフィギュレーション モードで parameter-map type skinny コマンドを使用して設定できます。このコマンドの構文は次のとおりです。
parameter-map type skinny name
name 引数は、パラメータ マップに割り当てられた識別子です。32 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
パラメータ マップを設定から削除するには、次のように入力します。
ACE は、登録済みの Skinny クライアントからのみ発呼できるように設定できます。このタスクを実行するために、ACE では、個々の Skinny クライアントの状態が保持されます。クライアントが CCM に登録されると、ACE はセキュア ポート(ピンホール)を開いて、クライアントからの発呼を許可します。デフォルトでは、この機能はディセーブルです。
登録の実行をイネーブルにするには、パラメータ マップの Skinny コンフィギュレーション モードで enforce-registration コマンドを使用します。このコマンドの構文は次のとおりです。
たとえば、Skinny クライアントの登録実行をイネーブルにするには、次のように入力します。
パラメータ マップの Skinny コンフィギュレーション モードで message-id max コマンドを使用すると、ACE で許可する SCCP StationMessageID の最大数を設定できます。このコマンドの構文は次のとおりです。
number 引数は、ACE で許可されるステーション メッセージ ID の最大数を 16 進数で指定するものです。0 ~ 4000 の 16 進数を入力します。最大設定値やデフォルト値を上回るステーション メッセージ ID を含むパケットが到着すると、ACE はこのパケットをドロップし、syslog メッセージを生成します。
たとえば、SCCP の最大メッセージ ID を 0x3000 に設定する場合は、次のように入力します。
最大メッセージ ID をデフォルト値 0x181 にリセットする場合は、次のように入力します。
ACE ではデフォルトの場合、SCCP プレフィクスの長さがメッセージ ID より短い SCCP メッセージをドロップします。ACE は、特定の最小長プレフィクスについてチェックを行うように設定することができます。また ACE は、プレフィクスの最大長をチェックするように設定できますが、このチェックはデフォルトでディセーブルです。ACE では、これらのチェックに不合格となった Skinny メッセージ パケットをすべてドロップし、syslog メッセージを生成します。
SCCP プレフィクスの最小長および最大長を設定するには、パラメータ マップの Skinny コンフィギュレーション モードで sccp-prefix-len コマンドを使用します。このコマンドの構文は次のとおりです。
sccp-prefix-len {max number | min number }
• max number ― SCCP プレフィクス最大長のチェックをイネーブルにします。整数で 4 ~ 4000 バイトを入力します。デフォルトは 4 バイトです。
• min number ― SCCP プレフィクスの最小長を指定します。整数で 4 ~ 4000 バイトを入力します。
たとえば、SCCP プレフィクスの最小長を設定するには、次のように入力します。
SCCP プレフィクスの最小長をデフォルト値にリセットするには、次のように入力します。
ポリシー マップ クラス コンフィギュレーション モードで appl-parameter skinny advanced-options コマンドを使用すると、SCCP パラメータ マップをレイヤ 3 およびレイヤ 4 ポリシー マップに関連付けることができます。
appl-parameter skinny advanced-options name
name 引数は、既存の SCCP パラメータ マップの名前です。パラメータ マップには SCCP トラフィック関連のアクションが集約されています。既存の SCCP パラメータ マップの名前に、64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。SCCP パラメータ マップの設定に関する詳細については、「SCCP パラメータ マップの設定」を参照してください。
たとえば、 appl-parameter skinny advanced-options コマンドを SCCP ディープ パケット インスペクション ポリシー マップのアクションとして指定するには、次のように入力します。
SCCP パケット インスペクション ポリシー マップから、SCCP パラメータ マップのアクションとしての関連付けを解除するには、次のように入力します。
パラメータ マップは、関連するアクションを組み合わせて、レイヤ 3 およびレイヤ 4 の SIP ディープ パケット インスペクション ポリシー マップで使用することができます。このパラメータ マップはポリシー マップ クラス コンフィギュレーション モードの appl-parameter コマンドで参照します。「SIP パラメータ マップとレイヤ 3 およびレイヤ 4 ポリシー マップの関連付け」を参照してください。
• SIP インスペクション コンフィギュレーションの注意事項
• ユーザ エージェント ソフトウェアのバージョン オプションの設定
• SIP メッセージにある SIP 以外の URI 検出のイネーブル化
• SIP パラメータ マップとレイヤ 3 およびレイヤ 4 ポリシー マップの関連付け
ACE で SIP インスペクションを設定するときは、次の点に注意してください。
• SIP パケットでオーナー フィールド(o=)の IP アドレスと、Session Description Protocol(SDP)部分にあるコネクション フィールド(c=)の IP アドレスが一致しない場合、ACE では IP アドレスが正しく変換されないことがあります。誤った IP アドレスの変換は、オーナー フィールド(o=)にポートの値を供給しないという SIP プロトコルの制限が原因で起きるものです。
• ACE で保護されたネットワーク上の SIP プロキシ サーバにリモート エンドポイントから登録を試みると、次の条件の場合に登録は失敗します。
SIP ディープ パケット インスペクションの SIP 拡張動作は、コンフィギュレーション モードで parameter-map type sip を使用して設定できます。
name 引数は、パラメータ マップに割り当てられた識別子です。32 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。
パラメータ マップを設定から削除するには、次のように入力します。
ACE は、メディアを SIP クライアントにストリーミングするために、一時的にセキュア ポート(ピンホール)を開きます。ハッカーがこのポートを悪用することがないように、パラメータ マップの SIP コンフィギュレーション モードで timeout コマンドを使用して、SIP メディアのタイムアウトを設定します。
number は、メディア ポートに対するタイムアウトの値を秒単位で指定する引数です。整数で 1 ~ 65535 秒を入力します。デフォルトは 5 秒です。ストリーミング メディア アプリケーションが完了するのに十分が時間が確保されるタイムアウト値を指定します。
たとえば、セキュア ストリーミング メディア ポートのタイムアウト値を 1 時間に指定するには、次のように入力します。
ストリーミング メディア ポートのタイムアウト値をデフォルト値の 5 秒に戻すには、次のように入力します。
SIP によるインスタント メッセージング(IM)がディセーブルになっている場合は、パラメータ マップの SIP コンフィギュレーション モードで im コマンドを使用すると、再びイネーブルにできます。IM はデフォルトではイネーブルです。
たとえば、インスタント メッセージングをイネーブルにするには、次のように入力します。
インスタント メッセージングをディセーブルにするには、次のように入力します。
(注) IM をディセーブルにすると、ACE では IM に属するメッセージがすべてドロップされます。
Max-Forwards ヘッダー フィールドにより、SIP 要求が宛先に到達するまでに通過するホップの数は制限されます。このヘッダー フィールドには整数を指定し、1 回のホップごとにその値が 1 減っていきます。要求が宛先に到達する前に、Max-Forwards の値が 0 になると、要求はエラー応答 483 Too Many Hops とともに拒否されます。検証が失敗した場合は、ACE に Max-Forwards ヘッダー フィールドの値を確認して、適切な動作を行うように指示できます。
ACE で Max-Forwards ヘッダー フィールドの値を検証するには、パラメータ マップ コンフィギュレーション モードで max-forward-validation コマンドを使用します。
max-forward-validation {log} | {{drop | reset} [log]}
• log ― ACE で最大転送検証イベントを記録するように指定します。
• drop ― ACE で SIP メッセージをドロップするように指定します。
• reset ― ACE で SIP 接続をリセットするように指定します。
たとえば、Max-Forwards ヘッダー フィールドの検証をイネーブルにするには、次のように入力します。
host1/Admin(config-parammap-sip)# max-forward-validation drop log
ユーザ エージェント(UA)のソフトウェア バージョンが外部にさらされると、UA は、このバージョンのソフトウェアに存在するセキュリティ ホールを悪用するハッカーからの攻撃の対象になることがあります。こうした攻撃から UA を守るために、ACE では、UA ソフトウェアのバージョンのログを記録したり、マスクしたりすることができます。
UA ソフトウェア バージョン オプションを設定するには、パラメータ マップの SIP コンフィギュレーション モードで software-version コマンドを使用します。
software-version {log} | {mask [log]}
• log ― ACE で UA ソフトウェア バージョンのログを記録するように指定します。
• mask ― ACE で UA ソフトウェア バージョンをマスクするように指定します。
たとえば、UA ソフトウェア バージョンをマスクするように ACE を設定するには、次のように入力します。
host1/Admin(config-parammap-sip)# software-version mask
ACE で次の SIP の必須ヘッダー フィールドの有無をチェックするように設定することにより、SIP パケット ヘッダーの妥当性を確認することができます。
SIP パケットで上のいずれかのヘッダー フィールドが欠落していると、ACE はパケットが無効であるとみなします。また ACEでは RFC 3261 に従って、隠れたヘッダー フィールドのチェックも行います。
SIP ヘッダーが検証要件に適合していない場合、ACE で実行する厳密なヘッダー検証とアクションをイネーブルにするには、パラメータ マップの SIP コンフィギュレーション モードで strict-header-validation コマンドを使用します。
strict-header-validation {log} | {{drop | reset} [log]}
• log ― ACE でヘッダー検証イベントを記録するように指定します。
• drop ― ACE で SIP メッセージをドロップするように指定します。
• reset ― ACE で接続をリセットするように指定します。
たとえば、パケット ヘッダーがヘッダーの検証要件に適合していない場合、ACE で厳密なヘッダー検証をイネーブルにし、イベントのログを記録するように指定するには、次のように入力します。
厳密なヘッダー検証をディセーブルにするには、次のように入力します。
パラメータ マップの SIP コンフィギュレーション モードで uri-non-sip コマンドを使用すると、SIP メッセージに含まれる SIP 以外の URI を検出することができます。
uri-non-sip {log} | {mask [log]}
• log ― ACE で SIP 以外の URI を記録するように指定します。
• mask ― ACE で SIP 以外の URI をマスクするように指定します。
たとえば、SIP メッセージに含まれる SIP 以外の URI を検出し、イベントのログを記録するには、次のように入力します。
SIP メッセージに含まれる SIP 以外の URI の検出をディセーブルにするには、次のように入力します。
ポリシー マップ クラス コンフィギュレーション モードで appl-parameter sip advanced-options コマンドを使用すると、SIP アプリケーション プロトコル インスペクション パラメータ マップをレイヤ 3 およびレイヤ 4 ポリシー マップに関連付けることができます。
appl-parameter sip advanced-options name
name 引数は、既存の SIP パラメータ マップの名前です。パラメータ マップには SIP トラフィック関連のアクションが集約されています。既存の SCCP パラメータ マップの名前に、64 文字までの英数字で、引用符とスペースを含まないテキスト文字列を入力します。SIP パラメータ マップの設定に関する詳細については、「SIP パラメータ マップの設定」を参照してください。
たとえば、 appl-parameter http advanced-options コマンドを SIP パケット インスペクション ポリシー マップのアクションとして指定するには、次のように入力します。
SIP パケット インスペクション ポリシー マップから、SIP パラメータ マップのアクションとしての関連付けを解除するには、次のように入力します。
service-policy コマンドを使用すると、次のタスクを実行できます。
• 特定の VLAN インターフェイスまたはグローバルに同じコンテキストのすべての VLAN インターフェイスへのトラフィック ポリシーの付加
• トラフィック ポリシーをインターフェイスの入力方向に付加する指定
service-policy コマンドは、インターフェイス コンフィギュレーション モードとコンフィギュレーション モードの両モードで使用できます。インターフェイス コンフィギュレーション モードでポリシー マップを指定すると、そのポリシー マップは特定の VLAN インターフェイスに適用されます。コンフィギュレーション モードでポリシー マップを指定すると、そのポリシー マップはコンテキストに関連付けられているすべての VLAN インターフェイスに適用されます。
service-policy input policy_name
• input ― VLAN インターフェイスの入力方向に接続する(適用する)トラフィック ポリシーを指定します。トラフィック ポリシーは、インターフェイスが受信するすべてのトラフィックを評価します。
• policy_name ― 以前に policy -map コマンドで作成、設定され、すでに定義済みのポリシー マップの名前。名前には 64 文字までの英数字が使用できます。
たとえば、ある VLAN インターフェイスを指定し、その VLAN に複数のサービス ポリシーを適用する場合は、次のように入力します。
たとえば、コンテキストに関連付けられているすべての VLAN に複数のサービス ポリシーをグローバルに適用するには、次のように入力します。
VLAN インターフェイスからトラフィック ポリシーを削除するには、次のように入力します。
コンテキストに関連付けられているすべての VLAN からトラフィック ポリシーをグローバルに削除するには、次のように入力します。
サービス ポリシーを最後に適用した VLAN インターフェイスからトラフィック ポリシーを個別に削除したり、同じコンテキストのすべての VLAN インターフェイスからトラフィック ポリシーをグローバルに削除した場合、ACE は関連付けられているポリシー統計情報を自動的にリセットします。この動作は、次回にトラフィック ポリシーが特定の VLAN インターフェイスに付加されたり、グローバルにすべての VLAN インターフェイスに付加されたりした場合に、サービス ポリシー統計情報に新しい開始ポイントを提供するために必要です。
サービス ポリシーの作成時は、次のガイドラインに従ってください。
• あるコンテキストでグローバルに適用されたポリシー マップは、そのコンテキスト内に存在するすべてのインターフェイスに内部的に適用されます。
• VLAN インターフェイス上のポリシーがアクティブにされると、指定されたすべてのグローバル ポリシーの重複している分類とアクション部分が上書きされます。
ここでは、次の項目を実行するための実行コンフィギュレーションの例を示します。
• HTTP プロトコルのレイヤ 7 ディープ パケット インスペクション
• レイヤ 3 およびレイヤ 4 DNS アプリケーション プロトコル インスペクション
各例において、アプリケーション プロトコル インスペクションのコンフィギュレーション部分は太字で示されています。
次の HTTP プロトコル ディープ パケット インスペクション コンフィギュレーションで ACE は下記の処理を行います。
• VLAN を通過するすべての HTTP トラフィックを IM で受信可能にする ACL を含めます。
• 「html」表現を含んでいる HTTL ヘッダーのみを許可する、コンテンツのフィルタリングを行います。
• 次のパケットの種類を許可するコンテンツ フィルタリング規則を使用して、HTTP トラフィックのサブセットをフィルタリングします。
次の FTP コマンド インスペクション コンフィギュレーションで ACE は下記の処理を行います。
• SYST コマンドおよび USER コマンドからの応答をマスクします。
次のアプリケーション プロトコル インスペクション コンフィギュレーションで、ACE はレイヤ 3 およびレイヤ 4 ポリシー マップを使用して DNS クエリー インスペクションを実行します。DNS クエリーがアクティビティ タイムアウトに基づく汎用 UDP 処理の対象とならないように、DNS にはアプリケーション インスペクションが必要です。ACE は DNS パケットの再構成を実行して、DNS 応答のパケット長が既定の最大長未満であることを確認します。
ACE の CLI には、アプリケーション プロトコル インスペクション統計情報およびサービス ポリシー コンフィギュレーション情報を表示する豊富な show コマンドが用意されています。このセクションの内容は、次のとおりです。
show stats inspect コマンドを使用すると、FTP、HTTP、または RTSP プロトコル インスペクション統計情報を表示できます。このコマンドの構文は次のとおりです。
show stats inspect {ftp | http | rtsp}
clear stats inspect コマンドを使用すると、HTTP プロトコル インスペクション統計情報をクリアします。
表3-9 に、 show stats inspect コマンドの出力に表示されるフィールドの説明を示します。
|
|
---|---|
HTTP の一致トラフィックに対し ACE が処置したアクションを追跡するために生成された Syslog メッセージの合計数ロギングは、関連付けられている HTTP インスペクション ポリシー マップのアクションとしてイネーブルになります。このフィールドには、 http キーワードについてのみ表示されます。 |
EXEC モードで show service-policy コマンド を使用すると、サービス ポリシー統計情報を表示できます。出力に表示される統計情報は、関連付けられているレイヤ 3 およびレイヤ 4 ポリシー マップのコンフィギュレーションによって異なります。 show service-policy コマンドでは、次の情報を表示します。
show service-policy policy_name [detail]
• policy_name ― 現在使用している(インターフェイスに適用されている)既存のポリシー マップの識別子(引用符を使用しない英数字で 64 文字までのテキスト文字列)。
• detail ― (任意)ポリシー マップ統計情報およびステータス情報をより詳しく表示します。
(注) ACE は、適用可能な接続がクローズしたあとで show service-policy コマンドが表示するカウンタをアップデートします。
たとえば、HTTP_INSPECT_L4POLICY ポリシー マップのサービス ポリシー統計情報を表示するには、次のように入力します。
たとえば、FTP_INSPECT_L4POLICY ポリシー マップのサービス ポリシー統計情報を表示するには、次のように入力します。
たとえば、APP_INSPECT_L4POLICY ポリシー マップのサービス ポリシー統計情報を表示するには、次のように入力します。
サービス ポリシー統計情報をクリアするには、 clear service-policy コマンドを使用します。このコマンドの構文は次のとおりです。
clear service-policy policy_name
policy_name 引数には、現在使用している(インターフェイスに適用されている)既存のポリシー マップの識別子を指定します。
たとえば、現在使用しているポリシー マップ HTTP_INSPECT_L4POLICY の統計情報をクリアするには、次のように入力します。
表3-10 に、 show service-policy detail コマンドで出力されるアプリケーション プロトコル インスペクション ポリシー マップのフィールドの説明を示します。