Cisco ASA: ポリシーベース

このトピックでは、ソフトウェア・バージョン8.5から9.7.0を実行しているCisco ASAのポリシーベースの構成について説明します。

重要

Oracleには、テスト済の一連のベンダーおよびデバイスの構成手順が用意されています。ベンダーおよびソフトウェアのバージョンに正しい構成を使用してください。

構成の検証にOracleで使用されたデバイスまたはソフトウェアのバージョンが、使用しているデバイスまたはソフトウェアと完全に一致しない場合でも、必要な構成をデバイスに作成できます。ベンダーのドキュメントを参照し、必要な調整を行ってください。

デバイスが、検証済のベンダーおよびデバイスのリストに含まれないベンダーのものである場合、またはIPSecのデバイスの構成をよく理解している場合は、サポートされているIPSecパラメータのリストを確認し、ベンダーのドキュメントを参照してください。

注意点として、OracleではASAソフトウェアに基づいて異なる構成が提供されています:

  • 9.7.1以降: ルートベースの構成
  • 8.5から9.7.0: ポリシーベースの構成(このトピック)
  • 8.5より前: Oracleの構成手順ではサポートされません。新しいバージョンにアップグレードすることを検討してください。
重要

相互運用性の問題を回避し、単一のCisco ASAデバイスによるトンネル冗長性を実現するために、ルートベースの構成を使用することをお薦めします。

Cisco ASAでは、9.7.1より古いソフトウェア・バージョンのルートベース構成はサポートされていません。最適な結果を得るため、デバイスで許可されていれば、ルートベースの構成をサポートするソフトウェア・バージョンにアップグレードすることをお薦めします。

ポリシーベースの構成では、Cisco ASAと動的ルーティング・ゲートウェイ(DRG)の間に1つのトンネルのみを構成できます。

Oracle Cloud Infrastructureは、オンプレミス・ネットワークと仮想クラウド・ネットワーク(VCN)間のセキュアなIPSec接続であるサイト間VPNを提供します。

次の図は、冗長トンネルを使用した、Oracle Cloud Infrastructureへの基本的なIPSec接続を示しています。この図のIPアドレスは単なる例であり、文字どおりには使用しません。

この図は、オンプレミス・ネットワーク、サイト間VPN IPSecトンネルおよびVCNの一般的なレイアウトを示しています。
重要

Oracleには、テスト済の一連のベンダーおよびデバイスの構成手順が用意されています。ベンダーおよびソフトウェアのバージョンに正しい構成を使用してください。

構成の検証にOracleで使用されたデバイスまたはソフトウェアのバージョンが、使用しているデバイスまたはソフトウェアと完全に一致しない場合でも、必要な構成をデバイスに作成できます。ベンダーのドキュメントを参照し、必要な調整を行ってください。

デバイスが、検証済のベンダーおよびデバイスのリストに含まれないベンダーのものである場合、またはIPSecのデバイスの構成をよく理解している場合は、サポートされているIPSecパラメータのリストを確認し、ベンダーのドキュメントを参照してください。

ベスト・プラクティス

この項では、サイト間VPNの使用に関するベスト・プラクティスと考慮事項について説明します。

Cisco ASA固有: VPNフィルタ

VPNフィルタにより、トンネルの開始前または終了後に、トラフィックをさらにフィルタできます。異なるトラフィック・タイプまたはソース/宛先フローをフィルタ処理するために追加の粒度が必要な場合は、VPNフィルタを使用します。詳細は、CiscoのVPNフィルタのドキュメントを参照してください。

VPNフィルタ構成は、CPE構成に記載されている構成テンプレートに含まれていません。VPNフィルタを使用するには、次の構成項目を手動で追加します。

  • アクセス制御リスト(ACL): トンネルの通過が許可されるトラフィックを制限するためにVPNフィルタが使用できるACLを作成します。VPNフィルタにすでに使用されているACLがある場合は、同様にインタフェース・アクセス・グループに使用しないでください。

    access-list ${vpnFilterAclName} extended permit ip ${VcnCidrNetwork} ${VcnCidrNetmask} ${onPremCidrNetwork} ${onPremCidrNetmask}
  • グループ・ポリシー: VPNフィルタをグループ・ポリシーに適用します。

    group-policy oracle-vcn-vpn-policy attributes
     vpn-filter value ${vpnFilterAclName}
  • トンネル・グループ: グループ・ポリシーをトンネル・グループに適用します。

    tunnel-group ${oracleHeadend1} general-attributes
     default-group-policy oracle-vcn-vpn-policy

興味深いトラフィック

CPEでサポートされている場合、Oracleでは、IPSecトンネルを介した興味深いトラフィックを常に実行することをお薦めします。Cisco ASAでは、対象となるトラフィックをIPSecトンネルを介して実行し続けるSLA監視を構成する必要があります。多くの場合、Cisco ASAがイニシエータ フェーズ2として動作するトラフィックは、対象トラフィックがなくなるまで発生しません。これにより、トンネルの起動時またはセキュリティ アソシエーションのキー更新後に SAがダウンします。このような状況を回避するために、継続的な興味深いトラフィックやIP SLAなどの機能を使用できます。詳細は、Cisco ASAポリシーベース構成テンプレートのIP SLA構成に関する項を参照してください。

すべてのIPSec接続に対してすべてのトンネルを構成します

Oracleは、接続ごとに2つのIPSecヘッドエンドをデプロイし、ミッションクリティカルなワークロードに高可用性を提供します。Oracle側では、これらの2つのヘッドエンドが別々のルーターに配置されて冗長性が確保されます。最大の冗長性のために使用可能なすべてのトンネルを構成することをお薦めします。これは「障害を前提とした設計」原理の重要な要素です。

オンプレミス・ネットワークの場所に冗長CPEを配置します

IPSecでOracle Cloud Infrastructureに接続する各サイトでは、冗長エッジ・デバイス(顧客構内機器(CPE)とも呼ばれる)を使用する必要があります。Oracle Consoleに各CPEを追加し、動的ルーティング・ゲートウェイ(DRG)と各CPE間に個別のIPSec接続を作成します。各IPSec接続に対して、Oracleは、地理的に冗長なIPSecヘッドエンド上に2つのトンネルをプロビジョニングします。詳細は、接続性冗長性ガイド(PDF)を参照してください。

ルーティング・プロトコルの考慮事項

サイト間VPN IPSec接続を作成する場合、2つの冗長IPSecトンネルがあります。両方のトンネルを使用するようにCPEを構成することをお薦めします(CPEでサポートされている場合)。以前は、Oracleによって、最大4つのIPSecトンネルを持つIPSec接続が作成されていました。

次の3つのルーティング・タイプを使用でき、サイト間VPNの各トンネルに対して個別にルーティング・タイプを選択します:

  • BGP動的ルーティング: 使用可能なルートは、BGPによって動的に学習されます。DRGは、オンプレミス・ネットワークからルートを動的に学習します。Oracle側では、DRGはVCNのサブネットを通知します。
  • 静的ルーティング: DRGへのIPSec接続を設定する場合は、VCNに通知する必要のあるオンプレミス・ネットワークへの特定のルートを指定します。VCNのサブネットへの静的ルートを使用して、CPEデバイスを構成する必要もあります。これらのルートは、動的には学習されません。
  • ポリシーベースのルーティング: DRGへのIPSec接続を設定する場合は、VCNに通知する必要のあるオンプレミス・ネットワークへの特定のルートを指定します。VCNのサブネットへの静的ルートを使用して、CPEデバイスを構成する必要もあります。これらのルートは、動的には学習されません。

BGP最適パス選択アルゴリズムの操作方法に関するOracle推奨など、サイト間VPNによるルーティングの詳細は、サイト間VPNのルーティングを参照してください。

その他の重要なCPE構成

CPEのアクセス・リストが、Oracle Cloud Infrastructureとの間で必要なトラフィックをブロックしないように正しく構成されていることを確認します。

複数のトンネルを同時に稼働させると、非対称ルーティングが発生する可能性があります。非対称ルーティングを許可するには、VCNからのトラフィックをどのトンネルでも処理できるようにCPEが構成されていることを確認します。たとえば、ICMP検査を無効にしたり、TCP状態バイパスを構成したりする必要があります。適切な構成の詳細は、CPEベンダーのサポートに問い合せてください。ルーティングを対称的に構成するには、サイト間VPNのルーティングを参照してください。

Cisco ASA固有: 注意事項および制限事項

この項では、Cisco ASA固有の重要な特性および制限について説明します。

適用可能な制限の一覧と制限の引上げをリクエストする手順は、「サービス制限」を参照してください。

トンネルMTUおよびPath MTU Discovery

Cisco ASAを使用してトンネルMTUおよびPath MTU Discoveryをアドレス指定するには、2つのオプションがあります:

オプション1: TCP MSS調整

IPSecトンネルを通じた最大転送単位(パケット・サイズ)は1500バイト未満です。トンネルを正常に通過するには大きすぎるパケットは、断片化できます。または、小さいパケットを送信するために必要なトンネルを通じて通信しているホストにシグナルを返すことができます。

トンネルを通じた新規TCPフローの最大セグメント・サイズ(MSS)を変更するようにCisco ASAを構成できます。ASAは、SYNフラグが設定されているTCPパケットを検索し、MSS値を構成済の値に変更します。この構成は、新規TCPフローがパスの最大転送単位検出(PMTUD)の使用を回避するのに役立ちます。

次のコマンドを使用して、MSSを変更します。このコマンドは、このトピックのCPE構成のサンプル構成には含まれません。必要に応じて、TCP MSS調整コマンドを手動で適用します。

sysopt connection tcpmss 1387

オプション2: Don't Fragmentビットのクリア/設定

Path MTU Discoveryでは、すべてのTCPパケットにDon't Fragment (DF)ビットが設定されている必要があります。DFビットが設定されており、パケットが大きすぎてトンネルを通過できない場合、ASAは到着時にそのパケットをドロップします。ASAは、ICMPパケットを送信元に戻し、受信したパケットがトンネルに対して大きすぎたことを示します。ASAには、DFビットを処理するための3つのオプションがあります。いずれかのオプションを選択して、構成に適用します:

  • DFビットを設定(推奨): パケットのIPヘッダーにDFビットが設定されます。元の受信パケットでDFビットがクリアされた場合でも、ASAはパケットを断片化できます。

    crypto ipsec df-bit set-df ${outsideInterface}
  • DFビットをクリア: DFビットはパケットのIPヘッダーでクリアされます。パケットは断片化され、再アセンブリのためにOracle Cloud Infrastructureのエンド・ホストに送信されます。

    crypto ipsec df-bit clear-df ${outsideInterface}
  • DFビットを無視(コピー): ASAは元のパケットのIPヘッダー情報を調べて、DFビットの設定をコピーします。

    crypto ipsec df-bit copy-df ${outsideInterface}

VPNトラフィックがあるトンネルに入り別のトンネルを出る可能性のある場合

VPNトラフィックが、パケットのネクスト・ホップに向かうインタフェースと同じセキュリティ・レベルを持つインタフェースに入る場合は、そのトラフィックを許可する必要があります。デフォルトでは、ASAで同じセキュリティ・レベルを持つインタフェース間のパケットはドロップされます。

同じセキュリティ・レベルを持つインタフェース間のトラフィックを許可する必要がある場合は、次のコマンドを手動で追加します。このコマンドは、CPE構成のサンプル構成には含まれません。

same-security-traffic permit inter-interface

一般的な注意事項および制限事項

この項では、サイト間VPNの一般的特性と制限について説明します。

適用可能な制限の一覧と制限の引上げをリクエストする手順は、「サービス制限」を参照してください。

非対称ルーティング

Oracleでは、IPSec接続を構成する複数のトンネル間で非対称ルーティングが使用されます。適切にファイアウォールを構成してください。そうしないと、接続を介したpingテストやアプリケーション・トラフィックが確実に機能しません。

複数のトンネルをOracle Cloud Infrastructureに使用する場合は、優先トンネルを通じてトラフィックを決定論的にルーティングするようにルーティングを構成することをお薦めします。1つのIPSecトンネルをプライマリとして使用し、別のトンネルをバックアップとして使用する場合は、プライマリ・トンネル(BGP)用として特定性の高いルートを構成し、バックアップ・トンネル(BGP/静的)用として特定性の低いルート(サマリーまたはデフォルト・ルート)を構成します。そうしないと、すべてのトンネルを通じて同じルート(デフォルト・ルートなど)を通知した場合、VCNからオンプレミス・ネットワークへの戻りトラフィックは、使用可能なトンネルのいずれかにルーティングされます。これは、Oracleが非対称ルーティングを使用するためです。

Oracleルーティングの対称ルーティングの強制方法に関する具体的な推奨事項は、サイト間VPNのルーティングを参照してください。

ルートベースまたはポリシーベースのIPSec接続

IPSecプロトコルは、セキュリティ・アソシエーション(SA)を使用してパケットの暗号化方法を判断します。各SA内で、パケットのソースIPアドレスと宛先IPアドレスおよびプロトコル・タイプをSAデータベースのエントリにマップする暗号化ドメインを定義して、パケットを暗号化または復号化する方法を定義します。

ノート

他のベンダーまたは業界のドキュメントでは、SAまたは暗号化ドメインを参照するときに、プロキシID、セキュリティ・パラメータ・インデックス(SPI)またはトラフィック・セレクタという用語が使用される場合があります。

IPSecトンネルを実装するには、一般的に2つの方法があります:

  • ルートベース・トンネル: ネクスト・ホップベース・トンネルとも呼ばれます。ルート表検索は、パケットの宛先IPアドレス上で実行されます。そのルートのエグレス・インタフェースがIPSecトンネルである場合、パケットは暗号化され、トンネルの他方の側に送信されます。
  • ポリシーベース・トンネル: パケットのソースと宛先のIPアドレスおよびプロトコルがポリシー・ステートメントのリストと照合されます。一致が検出されると、そのポリシー・ステートメント内のルールに基づいてパケットが暗号化されます。

Oracleサイト間VPNヘッドエンドではルートベース・トンネルが使用されますが、次の各項に示す注意事項を考慮しながら、ポリシーベース・トンネルとともに使用できます。

ルートベース・トンネル用の暗号化ドメイン

CPEでルートベース・トンネルがサポートされている場合は、この方法を使用してトンネルを構成します。これは最も単純な構成で、Oracle VPNヘッドエンドとの相互運用性が最も高くなっています。

ルートベースのIPSecでは、次の値を持つ暗号化ドメインが使用されます:

  • ソースIPアドレス: 任意(0.0.0.0/0)
  • 宛先IPアドレス: 任意(0.0.0.0/0)
  • プロトコル: IPv4

より特定的にする必要がある場合は、デフォルト・ルートではなく、暗号化ドメイン値に単一のサマリー・ルートを使用できます。

ポリシーベース・トンネル用の暗号化ドメイン

ポリシーベースのトンネルを使用する場合、定義するすべてのポリシー・エントリ(IPSec接続の片側にあるCIDRブロック)によって、トンネルのもう一方の端にあるすべての適格なエントリでIPSecセキュリティ・アソシエーション(SA)が生成されます。このペアは暗号化ドメインと呼ばれます。

この図では、IPSecトンネルのOracle DRG側に、3つのIPv4 CIDRブロックと1つのIPv6 CIDRブロックのポリシー・エントリがあります。トンネルのオンプレミスCPE側には、2つのIPv4 CIDRブロックと2つのIPv6 CIDRブロックのポリシー・エントリがあります。各エントリによって、トンネルのもう一方の端にあるすべての使用可能なエントリで暗号化ドメインが生成されます。SAペアの両側では、同じバージョンのIPを使用する必要があります。その結果、合計8つの暗号化ドメインが生成されます。

複数の暗号化ドメインおよびその番号を決定する方法を示す図。
重要

CPEでポリシーベース・トンネルのみがサポートされている場合は、次の制限に注意してください。

  • サイト間VPNは、複数の暗号化ドメインをサポートしていますが、暗号化ドメインの上限は50です。
  • 前述の例に似た状況で、CPE側で使用可能な6つのIPv4暗号化ドメインのうち3つのみを構成した場合、使用可能なすべての暗号化ドメインが常にDRG側に作成されるため、リンクは「一部稼働中」状態でリストされます。
  • ポリシーベースのルーティングは、サイト間VPN v2によって決まります。サイト間VPN v2の詳細は、更新されたサイト間VPNサービスを参照してください。
  • トンネルが作成された時期によっては、ポリシーベースのルーティングを使用するために既存のトンネルを編集できず、トンネルを新しいIPSecトンネルに置き換える必要がある場合があります。
  • トンネルのOracle DRG側で使用されるCIDRブロックは、トンネルのオンプレミスCPE側で使用されるCIDRブロックと重複できません。
  • 暗号化ドメインは常に、同じIPバージョンの2つのCIDRブロック間に存在する必要があります。

CPEがNATデバイスの背後にある場合

一般的に、接続の終端で構成されたCPE IKE識別子は、Oracleが使用しているCPE IKE識別子と一致する必要があります。デフォルトでは、OracleではCPEのパブリックIPアドレスが使用されます。これは、Oracle ConsoleでCPEオブジェクトを作成したときに指定したものです。ただし、CPEがNATデバイスの背後にある場合、次の図に示すように、終端で構成されたCPE IKE識別子がCPEのプライベートIPアドレスになる可能性があります。

この図は、NATデバイスの背後にあるCPE、パブリックIPアドレスとプライベートIPアドレス、およびCPE IKE識別子を示しています。
ノート

一部のCPEプラットフォームでは、ローカルIKE識別子を変更できません。実行できない場合は、Oracle ConsoleでリモートIKE IDを変更し、CPEのローカルIKE IDと一致させる必要があります。IPSec接続を設定するときに、または設定後に、IPSec接続を編集して値を指定できます。Oracleでは、値がIPアドレスまたはcpe.example.comなどの完全修飾ドメイン名(FQDN)であることが必要です。手順については、Oracleで使用されるCPE IKE識別子の変更を参照してください。

サポートされているIPSecパラメータ

すべてのリージョンでサポートされているIPSecパラメータのベンダー非依存のリストについては、サポートされているIPSecパラメータを参照してください。

商用クラウド・レルムのOracle BGP ASNは31898です。US Government Cloud用のサイト間VPNを構成する場合は、Government Cloudに必要なサイト間VPNパラメータおよびOracleのBGP ASNを参照してください。United Kingdom Government Cloudについては、OracleのBGP ASNを参照してください。

CPE構成

重要

この項の構成手順は、使用しているCPE用のOracle Cloud Infrastructureで提供されています。サポートが必要な場合は、CPEベンダーのサポートに直接問い合せてください。

次の図は、IPSec接続の基本的なレイアウトを示しています。

この図は、IPSec接続とトンネルの一般的なレイアウトを示しています。

指定された構成テンプレートは、バージョン8.5以降のソフトウェアを実行するCisco ASA用です。

ノート

Cisco ASAバージョン9.7.1以降では、ルートベースの構成がサポートされます。これは、相互運用性の問題を回避するために推奨される方法です。

単一のCisco ASAデバイスに対してトンネル冗長性を確保する場合は、ルートベースの構成を使用する必要があります。ポリシーベースの構成では、Cisco ASAと動的ルーティング・ゲートウェイ(DRG)の間に1つのトンネルのみを構成できます。

構成テンプレートでは、次の項目を指定する必要があります:

  • CPEパブリックIPアドレス: CPE上の外部インタフェースに割り当てられたインターネット・ルーティング可能なIPアドレス。ユーザーまたはOracle管理者は、Oracle ConsoleでCPEオブジェクトを作成するときに、この値をOracleに提供します。
  • 内部トンネル・インタフェース(BGPを使用する場合に必要): 内部トンネル・インタフェースのCPE終端とOracle終端のIPアドレス。これらの値は、Oracle ConsoleでIPSec接続を作成するときに指定します。
  • BGP ASN (BGPを使用する場合は必須): BGP ASN。

さらに、次が必要です:

  • CPEとローカル・ネットワーク間のトラフィックをルーティングする内部ルーティングを構成します。
  • 必ずASAとOracle VCN間のトラフィックを許可します(次の構成テンプレートは、このアクセス・リストを変数${outboundAclName}で参照します)。
  • 内部VPNグループ・ポリシーを識別します(次の構成テンプレートは、このグループ・ポリシーをoracle-vcn-vpn-policyとして参照します)。
  • 暗号化マップに使用される変換セットを識別します(次の構成テンプレートは、この変換セットをoracle-vcn-transformとして参照します)。
  • 暗号化マップの名前と順序番号を識別します(次の構成テンプレートは、マップ名をoracle-vpn-map-v1および順序番号1として参照します)。
  • IP SLA連続pingの操作番号を識別します(次の構成テンプレートは、操作番号1を使用します)。
重要

Oracle Cloud Infrastructureの次の構成テンプレートは、CPEに適用する必要がある操作の開始点となります。各CPEデバイス構成の構文は、モデルおよびソフトウェア・バージョンによって異なることがあります。CPEモデルおよびバージョンを適切な構成テンプレートと比較してください。

テンプレートで参照されているパラメータの一部は、CPE上で一意である必要があります。また、一意性はCPEにアクセスすることでのみ判別可能です。CPE上のパラメータが有効であり、以前に構成した値が上書きされないことを確認してください。特に、次の値が一意であることを確認してください:

  • ポリシー名または番号
  • 暗号化マップ名および順序番号

  • インタフェース名
  • アクセス・リスト名または番号(該当する場合)

Oracleは、Internet Key Exchangeバージョン1 (IKEv1)およびバージョン2 (IKEv2)をサポートしています。コンソールでIKEv2を使用するようにIPSec接続を構成する場合、CPEでサポートされているIKEv2および関連するIKEv2暗号化パラメータのみを使用するようにCPEを構成する必要があります。OracleでIKEv1またはIKEv2用にサポートされているパラメータのリストについては、サポートされているIPSecパラメータを参照してください。

Oracleでは、IKEv1とIKEv2に別個の構成テンプレートが提供されます。

また、Oracleでは、一部の情報が自動的に入力されたテンプレートを生成できるツールも提供されます。詳細は、CPE構成ヘルパーの使用を参照してください。

IKEv1構成テンプレート

IKEv1構成テンプレートを読みやすいように全画面表示します。

!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! IKEv1 Configuration Template
! The configuration consists of a single IPSec tunnel.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! The configuration template involves setting up the following:
! Access Lists
! ISAKMP Policy
! Base VPN Policy
! IPSec Configuration
! IPSec Tunnel Group Configuration
! IP Routing (BGP or Static)
! Optional: Disable NAT for VPN Traffic
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! The configuration template has various parameters that you must define before applying the configuration.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! PARAMETERS REFERENCED:
! ${OracleInsideTunnelIpAddress1} = Inside tunnel IP address of Oracle-side for the first tunnel. You provide these values when creating the IPSec connection in the Oracle Console.
! ${bgpASN} = Your BGP ASN
! ${cpePublicIpAddress} = The public IP address for the CPE. This is the IP address of your outside interface
! ${outboundAclName} = ACL used to control traffic out of your inside and outside interfaces
! ${oracleHeadend1} = Oracle public IP endpoint obtained from the Oracle Console.
! ${sharedSecret1} = You provide when you set up the IPSec connection in the Oracle Console, or you can use the default Oracle-provided value.
! ${outsideInterface} = The public interface or outside of tunnel interface which is configured with the CPE public IP address.
! ${vcnCidrNetwork} = VCN IP range
! ${vcnCidrNetmask} = Subnet mask for VCN
! ${onPremCidrNetwork} = On-premises IP range
! ${onPremCidrNetmask} = ON-premises subnet mask
! ${cryptoMapAclName} = Name of ACL which will be associated with the IPSec security association.
! ${vcnHostIp} = IP address of a VCN host. Used for IP SLA continuous ping to maintain tunnel UP state.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
 
! Access Lists
 
! Permit Traffic Between Your ASA and Your Oracle VCN
! Assuming there is an access-list controlling traffic in and out of your Internet facing interface, you will need to permit traffic between your CPE and the Oracle VPN Headend
! WARNING: The new ACL entry you add to permit the traffic between your ASA and VPN headend needs to be above any deny statements you might have in your existing access-list
 
access-list ${outboundAclName} extended permit ip host ${oracleHeadend1} host ${cpePublicIpAddress}
 
! Crypto ACL
! Create an ACL named ${cryptoMapAclName} which will later be associated with the IPSec security association using the 'crypto-map' command. This will define which source/destination traffic needs to be encrypted and sent across the VPN tunnel.
! Keep this ACL to a single entry. In a policy based configuration each ACL line will establish a separate encryption domain.
! The encryption domain used in this configuration sample will have a source/destination of any/VCN CIDR. Refer to the 'Encryption domain for policy-based tunnels' subsection for supported alternatives.
 
access-list ${cryptoMapAclName} extended permit ip any ${vcnCidrNetwork} ${vcnCidrNetmask}
 
! ISAKMP Policy
 
! ISAKMP Phase 1 configuration.
! IKEv1 is enabled on the outside interface.
! IKEv1 policy is created for Phase 1 which specifies to use a Pre-Shared Key, AES256, SHA1, Diffie-Hellman Group 5, and a Phase 1 lifetime of 28800 seconds (8 hours).
! If different parameters are required, modify this template before applying the configuration.
! WARNING: The IKEv1 group policy is created with a priority of 10. Make sure this doesn't conflict with any pre-existing configuration on your ASA.
 
crypto ikev1 enable outside
crypto ikev1 policy 10
 authentication pre-share
 encryption aes-256
 hash sha
 group 5
 lifetime 28800
 
! Base VPN Policy
 
! An internal VPN group policy named 'oracle-vcn-vpn-policy' is created to define some basic VPN tunnel settings
! Idle and session timeouts are disabled to maintain the tunnel UP state and tunnel protocol is set to IKEv1
 
group-policy oracle-vcn-vpn-policy internal
group-policy oracle-vcn-vpn-policy attributes
 vpn-idle-timeout none
 vpn-session-timeout none
 vpn-tunnel-protocol ikev1
 
! IPSec Configuration
 
! Create an IKEv1 transform set named 'oracle-vcn-transform' which defines a combination of IPSec (Phase 2) policy options. Specifically, AES256 for encryption and SHA1 for authentication.
! If different parameters are required, modify this template before applying the configuration.
 
crypto ipsec ikev1 transform-set oracle-vcn-transform esp-aes-256 esp-sha-hmac
 
! A crypto map is used to tie together the important traffic that needs encryption (via crypto map ACL) with defined security policies (from the transform set along with other crypto map statements), and the destination of the traffic to a specific crypto peer.
! In this configuration example, a single crypto map is created named 'oracle-vpn-map-v1' This crypto map references the previously created crypto map ACL, the 'oracle-vcn-transform' transform set and further defines PFS Group 5 and the security association lifetime to 3600 seconds (1 hour).
! WARNING: Make sure your crypto map name and sequence numbers do not overlap with existing crypto maps.
! WARNING: DO NOT use the 'originate-only' option with an Oracle IPSec tunnel. It causes the tunnel's traffic to be inconsistently blackholed. The command is only for tunnels between two Cisco devices. Here's an example of the command that you should NOT use for the Oracle IPSec tunnels: crypto map <map name> <sequence number> set connection-type originate-only
 
crypto map oracle-vpn-map-v1 1 match address ${cryptoMapAclName}
crypto map oracle-vpn-map-v1 1 set pfs group5
crypto map oracle-vpn-map-v1 1 set peer ${oracleHeadend1}
crypto map oracle-vpn-map-v1 1 set ikev1 transform-set oracle-vcn-transform
crypto map oracle-vpn-map-v1 1 set security-association lifetime seconds 3600
 
! WARNING: The below command will apply the 'oracle-vpn-map-v1' crypto map to the outside interface. The Cisco ASA supports a single crypto map per interface. Make sure no other crypto map is applied to the outside interface before using this command.
 
crypto map oracle-vpn-map-v1 interface outside
 
! IPSec Tunnel Group Configuration
 
! This configuration matches the group policy 'oracle-vcn-vpn-policy' with an Oracle VPN headend endpoint.
! The pre-shared key for each Oracle VPN headend is defined in the corresponding tunnel group.
 
tunnel-group ${oracleHeadend1} type ipsec-l2l
tunnel-group ${oracleHeadend1} general-attributes
 default-group-policy oracle-vcn-vpn-policy
tunnel-group ${oracleHeadend1} ipsec-attributes
 ikev1 pre-shared-key ${sharedSecret1}
 
! IP SLA Configuration
 
! The Cisco ASA doesn't establish a tunnel if there's no interesting traffic trying to pass through the tunnel.
! You must configure IP SLA on your device for a continuous ping so that the tunnel remains up at all times.
! You must allow ICMP on the outside interface.
! Make sure that the SLA monitor number used is unique.
 
sla monitor 1
 type echo protocol ipIcmpEcho ${vcnHostIp} interface outside
 frequency 5
sla monitor schedule 1 life forever start-time now
 
icmp permit any ${outsideInterface}
 
! IP Routing
! Pick either dynamic (BGP) or static routing. Uncomment the corresponding commands prior to applying configuration.
 
! Border Gateway Protocol (BGP) Configuration
! Uncomment below lines if you want to use BGP.
 
! router bgp ${bgpASN}
!  address-family ipv4 unicast
!   neighbor ${OracleInsideTunnelIpAddress1} remote-as 31898
!   neighbor ${OracleInsideTunnelIpAddress1} activate
!   network ${onPremCidrNetwork} mask ${onPremCidrNetmask}
!   no auto-summary
!   no synchronization
!  exit-address-family
 
! Static Route Configuration
! Uncomment below line if you want to use static routing.
  
! route outside ${VcnCidrNetwork} ${VcnCidrNetmask} ${OracleInsideTunnelIpAddress1}
 
! Disable NAT for VPN Traffic
 
! If you are using NAT for traffic between your inside and outside interfaces, you might need to disable NAT for traffic between your on-premises network and the Oracle VCN.
! Two objects are created for this NAT exemption. 'obj-OnPrem' represents the on-premises network as a default route, and 'obj-oracle-vcn-1' represents the VCN CIDR block used in Oracle Cloud Infrastructure.
! If different address ranges are required, modify this template before applying the configuration.
 
! object network obj-onprem
!  subnet 0.0.0.0 0.0.0.0
! object network obj-oracle-vcn-1
!  subnet ${vcnCidrNetwork} ${vcnCidrNetmask}
! nat (inside,outside) source static obj-onprem obj-onprem destination static obj-oracle-vcn-1 obj-oracle-vcn-1
IKEv2構成テンプレート

IKEv2構成テンプレートを読みやすいように全画面表示します。

!-------------------------------------------------------------------------------------------------------------------------------------------------------------

! IKEv2 Configuration Template
! The configuration consists of a single IPSec tunnel.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! The configuration template involves setting up the following:
! Access Lists
! IKEv2 Policy
! Base VPN Policy
! IPSec Configuration
! IPSec Tunnel Group Configuration
! IP Routing (BGP or Static)
! Optional: Disable NAT for VPN Traffic
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! The configuration template has various parameters that you must define before applying the configuration.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! PARAMETERS REFERENCED:
! ${OracleInsideTunnelIpAddress1} = Inside tunnel IP address of Oracle-side for the first tunnel. You provide these values when creating the IPSec connection in the Oracle Console.
! ${bgpASN} = Your BGP ASN
! ${cpePublicIpAddress} = The public IP address for the CPE. This is the IP address of your outside interface
! ${outboundAclName} = ACL used to control traffic out of your inside and outside interfaces
! ${oracleHeadend1} = Oracle public IP endpoint obtained from the Oracle Console.
! ${sharedSecret1} = You provide when you set up the IPSec connection in the Oracle Console, or you can use the default Oracle-provided value.
! ${outsideInterface} = The public interface or outside of tunnel interface which is configured with the CPE public IP address.
! ${vcnCidrNetwork} = VCN IP range
! ${vcnCidrNetmask} = Subnet mask for VCN
! ${onPremCidrNetwork} = On-premises IP range
! ${onPremCidrNetmask} = ON-premises subnet mask
! ${cryptoMapAclName} = Name of ACL which will be associated with the IPSec security association.
! ${vcnHostIp} = IP address of a VCN host. Used for IP SLA continuous ping to maintain tunnel UP state.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------

! Access Lists

! Permit Traffic Between Your ASA and Your Oracle VCN
! Assuming there is an access-list controlling traffic in and out of your Internet facing interface, you will need to permit traffic between your CPE and the Oracle VPN Headend
! WARNING: The new ACL entry you add to permit the traffic between your ASA and VPN headend needs to be above any deny statements you might have in your existing access-list

access-list ${outboundAclName} extended permit ip host ${oracleHeadend1} host ${cpePublicIpAddress}

! Crypto ACL
! Create an ACL named ${cryptoMapAclName} which will later be associated with the IPSec security association using the 'crypto-map' command. This will define which source/destination traffic needs to be encrypted and sent across the VPN tunnel.
! Keep this ACL to a single entry. In a policy based configuration each ACL line will establish a separate encryption domain.
! The encryption domain used in this configuration sample will have a source/destination of any/VCN CIDR. Refer to the 'Encryption domain for policy-based tunnels' subsection for supported alternatives.

access-list ${cryptoMapAclName} extended permit ip any ${vcnCidrNetwork} ${vcnCidrNetmask}

! IKEv2 Policy

! IKEv2 is enabled on the outside interface.
! IKEv2 policy is created and specifies use of a Pre-Shared Key, AES256, SHA1, Diffie-Hellman Group 5, and a lifetime of 28800 seconds (8 hours).
! If different parameters are required, modify this template before applying the configuration.
! WARNING: The IKEv2 group policy is created with a priority of 10. Make sure this doesn't conflict with any pre-existing configuration on your ASA.

crypto ikev2 enable outside
crypto ikev2 policy 10
 encryption aes-256
 integrity sha384
 group 5
 prf sha
 lifetime seconds 28800

! Base VPN Policy

! An internal VPN group policy named 'oracle-vcn-vpn-policy' is created to define some basic VPN tunnel settings
! Idle and session timeouts are disabled to maintain the tunnel UP state and tunnel protocol is set to IKEv2

group-policy oracle-vcn-vpn-policy internal
group-policy oracle-vcn-vpn-policy attributes
 vpn-idle-timeout none
 vpn-session-timeout none
 vpn-tunnel-protocol ikev2

! IPSec Configuration

! Create an IKEv2 IPSec proposal named 'oracle_v2_ipsec_proposal' which defines AES256 for encryption and SHA1 for authentication.
! If different parameters are required, modify this template before applying the configuration.

crypto ipsec ikev2 ipsec-proposal oracle_v2_ipsec_proposal
 protocol esp encryption aes-256
 protocol esp integrity sha-1

! A crypto map is used to tie together the important traffic that needs encryption (via crypto map ACL) with defined security policies (from the IPSec proposal along with other crypto map statements), and the destination of the traffic to a specific crypto peer.
! In this configuration example, a single crypto map is created named 'oracle-vpn-map-v2' This crypto map references the previously created crypto map ACL, the 'oracle_v2_ipsec_proposal' IPSec proposal and further defines PFS Group 5 and the security association lifetime to 3600 seconds (1 hour).
! WARNING: Make sure your crypto map name and sequence numbers do not overlap with existing crypto maps.
! WARNING: DO NOT use the 'originate-only' option with an Oracle IPSec tunnel. It causes the tunnel's traffic to be inconsistently blackholed. The command is only for tunnels between two Cisco devices. Here's an example of the command that you should NOT use for the Oracle IPSec tunnels: crypto map <map name> <sequence number> set connection-type originate-only

crypto map oracle-vpn-map-v2 1 match address ${cryptoMapAclName}
crypto map oracle-vpn-map-v2 1 set pfs group5
crypto map oracle-vpn-map-v2 1 set peer ${oracleHeadend1}
crypto map oracle-vpn-map-v2 1 set ikev2 ipsec-proposal oracle_v2_ipsec_proposal
crypto map oracle-vpn-map-v2 1 set security-association lifetime seconds 3600

! WARNING: The below command will apply the 'oracle-vpn-map-v2' crypto map to the outside interface. The Cisco ASA supports a single crypto map per interface. Make sure no other crypto map is applied to the outside interface before using this command.

crypto map oracle-vpn-map-v2 interface outside

! IPSec Tunnel Group Configuration

! This configuration matches the group policy 'oracle-vcn-vpn-policy' with an Oracle VPN headend endpoint.
! The pre-shared key for each Oracle VPN headend is defined in the corresponding tunnel group.

tunnel-group ${oracleHeadend1} type ipsec-l2l
tunnel-group ${oracleHeadend1} general-attributes
 default-group-policy oracle-vcn-vpn-policy
tunnel-group ${oracleHeadend1} ipsec-attributes
 ikev2 local-authentication pre-shared-key ${sharedSecret1}
 ikev2 remote-authentication pre-shared-key ${sharedSecret1}

! IP SLA Configuration

! The Cisco ASA doesn't establish a tunnel if there's no interesting traffic trying to pass through the tunnel.
! You must configure IP SLA on your device for a continuous ping so that the tunnel remains up at all times.
! You must allow ICMP on the outside interface.
! Make sure that the SLA monitor number used is unique.

sla monitor 1
type echo protocol ipIcmpEcho ${vcnHostIp} interface outside
frequency 5
sla monitor schedule 1 life forever start-time now

icmp permit any ${outsideInterface}

! IP Routing
! Pick either dynamic (BGP) or static routing. Uncomment the corresponding commands prior to applying configuration.

! Border Gateway Protocol (BGP) Configuration
! Uncomment below lines if you want to use BGP.

! router bgp ${bgpASN}
!  address-family ipv4 unicast
!   neighbor ${OracleInsideTunnelIpAddress1} remote-as 31898
!   neighbor ${OracleInsideTunnelIpAddress1} activate
!   network ${onPremCidrNetwork} mask ${onPremCidrNetmask}
!   no auto-summary
!   no synchronization
!  exit-address-family

! Static Route Configuration
! Uncomment below line if you want to use static routing.

! route outside ${VcnCidrNetwork} ${VcnCidrNetmask} ${OracleInsideTunnelIpAddress1}

! Disable NAT for VPN Traffic

! If you are using NAT for traffic between your inside and outside interfaces, you might need to disable NAT for traffic between your on-premises network and the Oracle VCN.
! Two objects are created for this NAT exemption. 'obj-OnPrem' represents the on-premises network as a default route, and 'obj-oracle-vcn-1' represents the VCN CIDR block used in Oracle Cloud Infrastructure.
! If different address ranges are required, modify this template before applying the configuration.

! object network obj-onprem
!  subnet 0.0.0.0 0.0.0.0
! object network obj-oracle-vcn-1
!  subnet ${vcnCidrNetwork} ${vcnCidrNetmask}
! nat (inside,outside) source static obj-onprem obj-onprem destination static obj-oracle-vcn-1 obj-oracle-vcn-1

検証

基本的なトラブルシューティングのために、次のASAコマンドが用意されています。詳細は、CiscoのIPSecトラブルシューティングに関するドキュメントを参照してください。

次のコマンドを使用して、ISAKMPセキュリティ・アソシエーションが2つのピア間で構築されていることを確認します。

show crypto isakmp sa

次のコマンドを使用して、すべてのBGP接続のステータスを確認します。

show bgp summary

次のコマンドを使用して、ASAのルート表を確認します。

show route

モニタリング・サービスは、クラウド・リソースをアクティブおよびパッシブにモニターするためにOracle Cloud Infrastructureから使用できます。サイト間VPNのモニタリングの詳細は、サイト間VPNのメトリックを参照してください。

問題がある場合は、サイト間VPNのトラブルシューティングを参照してください。