Juniper SRX

このトピックでは、ソフトウェア・バージョンJunOS 11.0以降を実行しているJuniper SRXの構成について説明します。

重要

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

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

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

次の図は、冗長トンネルを使用した、Oracle Cloud Infrastructureへの基本的なIPSec接続を示しています。この図で使用されているIPアドレスは、単なる例です。

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

ベスト・プラクティス

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

すべての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のルーティングを参照してください。

注意事項および制限事項

この項では、注意する必要のあるサイト間VPNの重要な一般的特性と制限について説明します。適用可能な制限のリストと制限の引上げをリクエストする手順は、サービス制限を参照してください。

非対称ルーティング

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

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

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

ルートベースまたはポリシーベースのサイト間VPN

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接続とトンネルの一般的なレイアウトを示しています。

指定された構成テンプレートは、JunOS 11.0以降のソフトウェアを実行するJuniper SRXルーター用です。テンプレートは、構成する必要がある各トンネルに情報を提供します。最大の冗長性のために、構成されたすべてのトンネルを設定することをお薦めします。

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

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

さらに、次が必要です:

  • 外部トンネル・インタフェースを構成します(CPEパブリックIPアドレスはこのインタフェースにバインドされます)。
  • トンネル・インタフェースID (次の構成テンプレートではst0.1およびst0.2と呼ばれる)を構成します。IPSec接続ごとに複数のトンネル・ユニット番号が必要です。
  • CPEとローカル・ネットワーク間のトラフィックをルーティングする内部ルーティングを構成します。
  • 外部インタフェースのセキュリティ・ゾーンを識別します(次の構成テンプレートは、このゾーンをinternet_untrustとして参照します)。
  • 内部インタフェースのセキュリティ・ゾーンを識別します(次の構成テンプレートは、このゾーンをoracle_trustとして参照します)。
  • トンネル・インタフェースのセキュリティ・ゾーンを識別します(次の構成テンプレートは、このゾーンをoracle_vpnとして参照します)。
重要

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

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

構成を適用する前に定義する必要のあるパラメータを検索するには、テンプレート内でキーワードUSER_DEFINEDを検索してください。

IKEv2の使用について

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

IKEゲートウェイを定義するときに、IKEバージョンを指定します。次の構成には、IKEv1とIKEv2のIKEゲートウェイの構成方法を示すコメントがあります。

構成テンプレート

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

--------------------------------------------------------------------------------------------------------------------------------------------------------------
# Configuration Template
# The configuration consists of two IPSec tunnels. Oracle highly recommends that you configure both tunnels for maximum redundancy.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
# The configuration template involves setting up the following:
# PHASE 1
# PHASE 2
# SETTING THE SECURITY ZONES FOR ORACLE
# SETTING THE SECURITY POLICIES FOR ORACLE
# SETTING THE SECURITY SETTING FOR ORACLE
# SETTING BGP/STATIC ROUTING
--------------------------------------------------------------------------------------------------------------------------------------------------------------
# The configuration template has various parameters that you must define before applying the configuration.
# Search in the template for the keyword "USER_DEFINED" to find those parameters.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
# PARAMETERS REFERENCED:
# oracle_headend_1 = Oracle public IP endpoint obtained from the Oracle Console.
# oracle_headend_2 = Oracle public IP endpoint obtained from the Oracle Console.
# connection_presharedkey_1 = You provide when you set up the IPSec connection in the Oracle Console, or you can use the default Oracle-provided value.
# connection_presharedkey_2 = You provide when you set up the IPSec connection in the Oracle Console, or you can use the default Oracle-provided value.
# outside_public_interface = The public interface or outside of tunnel interface which is configured with the CPE public IP address. Example: ge-0/0/1.0
# cpe_public_ip_address = The internet-routable IP address that is assigned to the public interface on the CPE. You provide this when creating the CPE object in the Oracle Console.
# inside_tunnel_interface = The internal-facing interface for the on-premises network behind the SRX that needs to reach the Oracle VCN. Example: ge-0/0/0.0
# inside_tunnel_interface_ip_address = The IP addresses for the CPE and Oracle ends of the inside tunnel interface. You provide these when creating the IPSec connection in the Oracle Console.
# inside_tunnel_interface_ip_address_neighbor = The neighbor IP address between tbe SRX and Oracle end points of the inside tunnel interface.
# internal_network_ip_range = Internal on-premise network behind the SRX that needs to reach resources in the Oracle VCN.
# bgp_asn = Your ASN
# vcn_range = VCN IP Range
--------------------------------------------------------------------------------------------------------------------------------------------------------------
  
# IPSec Tunnel 1
   
# #1: Internet Key Exchange (IKE) Configuration (Phase 1)
# Defining the IKE Proposal for Oracle
# This IKE (Phase 1) configuration template uses AES256, SHA384, Diffie-Hellman Group 5, and 28800 second (8 hours) IKE session key lifetime.
# If different parameters are required, modify this template before applying the configuration.
   
set security ike proposal oracle-ike-proposal authentication-method pre-shared-keys
set security ike proposal oracle-ike-proposal authentication-algorithm sha-384
set security ike proposal oracle-ike-proposal encryption-algorithm aes-256-cbc
set security ike proposal oracle-ike-proposal lifetime-seconds 28800
set security ike proposal oracle-ike-proposal dh-group group5
   
# Defining the IKE Policy for Oracle
# USER_DEFINED: Replace the parameters in the section below as needed
   
set security ike policy ike_pol_oracle-vpn-<oracle_headend_1> mode main
set security ike policy ike_pol_oracle-vpn-<oracle_headend_1> proposals oracle-ike-proposal
set security ike policy ike_pol_oracle-vpn-<oracle_headend_1> pre-shared-key ascii-text <connection_presharedkey_1>
   
# Setting up Public Interface with the CPE Public IP.
# USER_DEFINED: Replace the parameters in the section below as needed
   
set interfaces <outside_public_interface> unit 0 family inet address <cpe_public_ip_address>
  
# Defining the IKE Gateway for Oracle
# USER_DEFINED: Replace the parameters in the section below as needed.
# This option enables IPsec Dead Peer Detection, which causes periodic messages to be sent to ensure a Security Association remains operational.
# If you want to use IKEv1 instead, comment out the line below that ends with "version v2-only".
  
set security ike gateway gw_oracle-<oracle_headend_1> ike-policy ike_pol_oracle-vpn-<oracle_headend_1>
set security ike gateway gw_oracle-<oracle_headend_1> external-interface <outside_public_interface>
set security ike gateway gw_oracle-<oracle_headend_1> address <oracle_headend_1>
set security ike gateway gw_oracle-<oracle_headend_1> dead-peer-detection
set security ike gateway gw_oracle-<oracle_headend_1> version v2-only
set security ike gateway gw_oracle-<oracle_headend_1> local-identity inet <cpe_public_ip_address>
   
# #2: IPSec Configuration
  
# Defining the IPSec (Phase 2) Proposal for Oracle
# The IPSec proposal defines the protocol, authentication, encryption, and lifetime parameters for the IPsec security association.
# The configuration template sets AES256 for encryption, SHA1 for authentication, enables PFS group 5, and sets the IPSec session key lifetime to 3600 seconds (1 hour).
# The IPsec policy incorporates the Diffie-Hellman group and the IPsec proposal.
# If different parameters are required, modify this template before applying the configuration.
   
set security ipsec vpn-monitor-options
set security ipsec proposal oracle-ipsec-proposal protocol esp
set security ipsec proposal oracle-ipsec-proposal authentication-algorithm hmac-sha1-96
set security ipsec proposal oracle-ipsec-proposal encryption-algorithm aes-256-cbc
set security ipsec proposal oracle-ipsec-proposal lifetime-seconds 3600
  
# Defining the IPSec (PHASE 2) policy for Oracle
set security ipsec policy ipsec_pol_oracle-vpn perfect-forward-secrecy keys group5
set security ipsec policy ipsec_pol_oracle-vpn proposals oracle-ipsec-proposal
   
# Defining Security Association for Oracle
# USER_DEFINED: Replace the parameters in the section below as needed
# The IPsec Policy and IKE gateways are associated with a tunnel interface (st0.1). If other tunnels are defined on your router, you must specify a unique interface name (for example, st0.2).
# The df-bit clear option allows the SRX to fragment the packet and send it to the end host in Oracle Cloud Infrastructure to reassemble the packet.
   
set security ipsec vpn oracle-vpn-<oracle_headend_1> bind-interface st0.1
set security ipsec vpn oracle-vpn-<oracle_headend_1> vpn-monitor
set security ipsec vpn oracle-vpn-<oracle_headend_1> ike gateway gw_oracle-<oracle_headend_1>
set security ipsec vpn oracle-vpn-<oracle_headend_1> ike ipsec-policy ipsec_pol_oracle-vpn
set security ipsec vpn oracle-vpn-<oracle_headend_1> df-bit clear
set security ipsec vpn establish-tunnels immediately
   
# #3: Tunnel Interface Configuration
   
# Defining the Tunnel Interface
# USER_DEFINED: Replace the parameters in the section below as needed
   
set interfaces st0.1 family inet address <inside_tunnel_interface_ip_address>
set interfaces st0.1 family inet mtu 1430
set interfaces <inside_tunnel_interface> unit 0 family inet address <internal_network_ip_range>
  
# Setting the Security Zones for Oracle
# USER_DEFINED: Replace the parameters in the section below as needed
# Tunnel interface st0.1, inside_tunnel_interface and outside_public_interface are each defined in its own security zones.
  
set security zones security-zone oracle_vpn interfaces st0.1
set security zones security-zone oracle_trust interfaces <inside_tunnel_interface>
set security zones security-zone internet_untrust interfaces <outside_public_interface>
   
# The security zone protecting outside interface of the router must be configured to allow IKE and ping inbound traffic.
   
set security zones security-zone internet_untrust interfaces <outside_public_interface> host-inbound-traffic system-services ike
set security zones security-zone internet_untrust interfaces <outside_public_interface> host-inbound-traffic system-services ping
   
# The security zone protecting the logical tunnel interface must be configured to allow BGP inbound traffic.
   
set security zones security-zone oracle_vpn interfaces st0.1 host-inbound-traffic protocols bgp
   
# This option causes the router to reduce the Maximum Segment Size of TCP packets to prevent packet fragmentation.
   
set security flow tcp-mss ipsec-vpn mss 1387
   
# #4: Policies
  
# Setting the Security Policies for Oracle
# Policies basically define the permitted flow of traffic between defined security zones.
# The configuration template permits any ipv4 traffic sourced and destined between security zones oracle_trust and oracle_vpn.
   
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out match source-address any-ipv4
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out match destination-address any-ipv4
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out match application any
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out match source-identity any
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out then permit
    
 
# #5a: Border Gateway Protocol (BGP) Configuration
   
# USER_DEFINED: Replace the parameters in the section below as needed                                                                                 
# BGP is used within the tunnel to exchange prefixes between the dynamic routing gateway and your CPE. The DRG dynamically learns the routes from your on-premises network. On the Oracle side, the DRG advertises the VCN's subnets.
# The configuration template uses a basic route policy to advertise a default route to the DRG.
# To advertise additional prefixes to the Oracle VCN, add additional prefixes to the term ORACLE-DEFAULT policy. Make sure the prefix is present in the route table of the device with a valid next-hop.                                                                                  
# You configure the local BGP Autonomous System Number (BGP ASN) when you set up the IPSec connection in the Oracle Console. If you later need to change the ASN, you must recreate the CPE object and IPSec connection in the Oracle Console.  
   
set policy-options policy-statement ORACLE-DEFAULT term default from route-filter 0.0.0.0/0 exact                                                            
set policy-options policy-statement ORACLE-DEFAULT term default then accept  
set policy-options policy-statement ORACLE-DEFAULT term reject then reject
   
set protocols bgp group ebgp type external
set protocols bgp group ebgp neighbor <inside_tunnel_interface_ip_address_neighbor> export ORACLE-DEFAULT
set protocols bgp group ebgp neighbor <inside_tunnel_interface_ip_address_neighbor> peer-as 31898
set protocols bgp group ebgp neighbor <inside_tunnel_interface_ip_address_neighbor> local-as <bgp_asn>
 
 
# #5b: Static Route Configuration
 
# USER_DEFINED: Replace the parameters in the section below as needed
# In case you plan to use static routing to get traffic through the IPSec tunnels, you can point the routes down to the tunnel interfaces. You should redistribute these routes into your on-premises network. Configuration for CPE to VCN static routes:
   
set routing-options static route <vcn_range> next-hop st0.1
  
--------------------------------------------------------------------------------------------------------------------------------------------------------------
   
# IPSec Tunnel 2
   
# #1: Internet Key Exchange (IKE) Configuration (Phase 1)
# Defining the IKE Proposal for Oracle
# This IKE (Phase 1) configuration template uses AES256, SHA384, Diffie-Hellman Group 5, and 28800 second (8 hours) IKE session key lifetime.
# If different parameters are required, modify this template before applying the configuration.
   
set security ike proposal oracle-ike-proposal authentication-method pre-shared-keys
set security ike proposal oracle-ike-proposal authentication-algorithm sha-384
set security ike proposal oracle-ike-proposal encryption-algorithm aes-256-cbc
set security ike proposal oracle-ike-proposal lifetime-seconds 28800
set security ike proposal oracle-ike-proposal dh-group group5
   
# Defining the IKE Policy for Oracle
# USER_DEFINED: Replace the parameters in the section below as needed
   
set security ike policy ike_pol_oracle-vpn-<oracle_headend_2> mode main
set security ike policy ike_pol_oracle-vpn-<oracle_headend_2> proposals oracle-ike-proposal
set security ike policy ike_pol_oracle-vpn-<oracle_headend_2> pre-shared-key ascii-text <connection_presharedkey_2>
   
# Setting up Public Interface with the CPE Public IP.
# USER_DEFINED: Replace the parameters in the section below as needed
   
set interfaces <outside_public_interface> unit 0 family inet address <cpe_public_ip_address>
  
# Defining the IKE Gateway for Oracle
# USER_DEFINED: Replace the parameters in the section below as needed.
# This option enables IPsec Dead Peer Detection, which causes periodic messages to be sent to ensure a Security Association remains operational.
# If you want to use IKEv1 instead, comment out the line below that ends with "version v2-only".
  
set security ike gateway gw_oracle-<oracle_headend_2> ike-policy ike_pol_oracle-vpn-<oracle_headend_2>
set security ike gateway gw_oracle-<oracle_headend_2> external-interface <outside_public_interface>
set security ike gateway gw_oracle-<oracle_headend_2> address <oracle_headend_2>
set security ike gateway gw_oracle-<oracle_headend_2> dead-peer-detection
set security ike gateway gw_oracle-<oracle_headend_2> version v2-only
set security ike gateway gw_oracle-<oracle_headend_2> local-identity inet <cpe_public_ip_address>
   
# #2: IPSec Configuration
  
# Defining the IPSec (Phase 2) Proposal for Oracle
# The IPSec proposal defines the protocol, authentication, encryption, and lifetime parameters for our IPsec security association.
# The configuration template sets AES256 for encryption, SHA1 for authentication, enables PFS group 5, and sets the IPSec session key lifetime to 3600 seconds (1 hour).
# The IPsec policy incorporates the Diffie-Hellman group and the IPsec proposal.
# If different parameters are required, modify this template before applying the configuration.
   
set security ipsec vpn-monitor-options
set security ipsec proposal oracle-ipsec-proposal protocol esp
set security ipsec proposal oracle-ipsec-proposal authentication-algorithm hmac-sha1-96
set security ipsec proposal oracle-ipsec-proposal encryption-algorithm aes-256-cbc
set security ipsec proposal oracle-ipsec-proposal lifetime-seconds 3600
  
# Defining the IPSec (PHASE 2) policy for Oracle
set security ipsec policy ipsec_pol_oracle-vpn perfect-forward-secrecy keys group5
set security ipsec policy ipsec_pol_oracle-vpn proposals oracle-ipsec-proposal
   
# Defining Security Association for Oracle
# USER_DEFINED: Replace the parameters in the section below as needed
# The IPsec Policy and IKE gateways are associated with a tunnel interface (st0.2). If other tunnels are defined on your router, you must specify a unique interface name.
# The df-bit clear option allows the SRX to fragment the packet and send it to the end host in Oracle Cloud Infrastructure to reassemble the packet.
   
set security ipsec vpn oracle-vpn-<oracle_headend_2> bind-interface st0.2
set security ipsec vpn oracle-vpn-<oracle_headend_2> vpn-monitor
set security ipsec vpn oracle-vpn-<oracle_headend_2> ike gateway gw_oracle-<oracle_headend_2>
set security ipsec vpn oracle-vpn-<oracle_headend_2> ike ipsec-policy ipsec_pol_oracle-vpn
set security ipsec vpn oracle-vpn-<oracle_headend_2> df-bit clear
set security ipsec vpn establish-tunnels immediately
   
# #3: Tunnel Interface Configuration
   
# Defining the Tunnel Interface
# USER_DEFINED: Replace the parameters in the section below as needed
   
set interfaces st0.2 family inet address <inside_tunnel_interface_ip_address>
set interfaces st0.2 family inet mtu 1430
set interfaces <inside_tunnel_interface> unit 0 family inet address <internal_network_ip_range>
  
# Setting the Security Zones for Oracle
# USER_DEFINED: Replace the parameters in the section below as needed
# Tunnel interface st0.2, inside_tunnel_interface and outside_public_interface are each defined in its own security zones.
  
set security zones security-zone oracle_vpn interfaces st0.2
set security zones security-zone oracle_trust interfaces <inside_tunnel_interface>
set security zones security-zone internet_untrust interfaces <outside_public_interface>
   
# The security zone protecting outside interface of the router must be configured to allow IKE and ping inbound traffic.
   
set security zones security-zone internet_untrust interfaces <outside_public_interface> host-inbound-traffic system-services ike
set security zones security-zone internet_untrust interfaces <outside_public_interface> host-inbound-traffic system-services ping
   
# The security zone protecting the logical tunnel interface must be configured to allow BGP inbound traffic.
   
set security zones security-zone oracle_vpn interfaces st0.2 host-inbound-traffic protocols bgp
   
# This option causes the router to reduce the Maximum Segment Size of TCP packets to prevent packet fragmentation.
   
set security flow tcp-mss ipsec-vpn mss 1387
   
# #4: Policies
  
# Setting the Security Policies for Oracle
# Policies basically define the permitted flow of traffic between defined security zones.
# The configuration template permits any IPv4 traffic sourced and destined between security zones oracle_trust and oracle_vpn.
   
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out match source-address any-ipv4
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out match destination-address any-ipv4
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out match application any
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out match source-identity any
set security policies from-zone oracle_trust to-zone oracle_vpn policy vpn-out then permit
   
# #5a: Border Gateway Protocol (BGP) Configuration
   
# USER_DEFINED: Replace the parameters in the section below as needed                                                                                 
# BGP is used within the tunnel to exchange prefixes between the dynamic routing gateway and your CPE. The DRG dynamically learns the routes from your on-premises network. On the Oracle side, the DRG advertises the VCN's subnets.
# THe configuration template uses a basic route policy to advertise a default route to the DRG.
# To advertise additional prefixes to the Oracle VCN, add additional prefixes to the term ORACLE-DEFAULT policy. Make sure the prefix is present in the route table of the device with a valid next-hop.                                                                                  
# You configure the local BGP Autonomous System Number (BGP ASN) when you set up the IPSec connection in the Oracle Console. If you later need to change the ASN, you must recreate the CPE object and IPSec connection in the Oracle Console.  
   
set policy-options policy-statement ORACLE-DEFAULT term default from route-filter 0.0.0.0/0 exact                                                            
set policy-options policy-statement ORACLE-DEFAULT term default then accept  
set policy-options policy-statement ORACLE-DEFAULT term reject then reject
   
set protocols bgp group ebgp type external
set protocols bgp group ebgp neighbor <inside_tunnel_interface_ip_address_neighbor> export ORACLE-DEFAULT
set protocols bgp group ebgp neighbor <inside_tunnel_interface_ip_address_neighbor> peer-as 31898
set protocols bgp group ebgp neighbor <inside_tunnel_interface_ip_address_neighbor> local-as <bgp_asn>
  
# #5b: Static Route Configuration
 
# USER_DEFINED: Replace the parameters in the section below as needed
# In case you plan to use static routing to get traffic through the IPSec tunnels, you can point the routes down to the tunnel interfaces. You should redistribute these routes into your on-premises network. Configuration for CPE to VCN static routes:
  
set routing-options static route <vcn_range> next-hop st0.2

検証

次のコマンドを使用して、セキュリティ・アソシエーション(SA)を検証します。


show security ipsec security-associations

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


show bgp summary

次のコマンドを使用して、Oracle Cloud Infrastructureに通知し、そこから受信するためのルートを確認します。


show route advertising-protocol bgp <neighbor-address>
  
show route receive-protocol bgp <neighbor-address>

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

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