すべてのプロダクト
Search
ドキュメントセンター

VPN Gateway:Ciscoファイアウォールの設定

最終更新日:Oct 22, 2024

Alibaba cloud上のデータセンターと仮想プライベートクラウド (VPC) との間にIPsec-VPN接続を確立するには、Alibaba Cloud上のVPNゲートウェイを設定した後、データセンターのゲートウェイデバイスにVPN設定を追加する必要があります。 このトピックでは、VPN設定をCiscoファイアウォールに追加する方法について説明します。

シナリオ

image

この例では、企業がAlibaba CloudにVPCをデプロイしています。 VPCのCIDRブロックは10.0.0.0/16です。 アプリケーションは、VPCのECS (Elastic Compute Service) インスタンスにデプロイされます。 同社には、VPCと通信するためにCIDRブロック192.168.0.0/16を使用する必要があるデータセンターがあります。 同社は、相互リソースアクセスを実装するために、データセンターとクラウド上のVPC間にIPsec-VPN接続を確立したいと考えています。

重要

このシナリオでは、データセンターのCiscoファイアウォールが、2つのパブリックIPアドレスを使用して、デュアルトンネルモードでAlibaba CloudへのIPsec-VPN接続を確立します。 VPNゲートウェイがシングルトンネルモードのIPsec-VPN接続のみをサポートしている場合は、このトピックの「シングルトンネルを使用するCiscoファイアウォールの構成」を参照してください。

VPNゲートウェイをアップグレードしてデュアルトンネルモードを有効にすることを推奨します。 IPsec-デュアルトンネルモードのVPN接続は、ゾーン間のディザスタリカバリをサポートします。 これは、ネットワークの高可用性を効果的に高める。 詳細については、「VPN gatewayのアップグレードによるデュアルトンネルモードの有効化」をご参照ください。

CIDRブロックプランとサンプルVPN設定

CIDRブロックプラン

リソース

CIDRブロック

IPアドレス

データセンター

VPCと通信する必要があるCIDRブロック: 192.168.0.0/16

サーバーIPアドレス: 192.168.50.198

Ciscoファイアウォール

非該当

Ciscoファイアウォールでインターネットに接続する物理インターフェイス:

  • GigabitEthernet 0/0: このインターフェイスはパブリックIPアドレスで設定されています。 この例では、121.XX. XX.211が使用されます。

  • GigabitEthernet 0/2: このインターフェイスはパブリックIPアドレスで設定されています。 この例では、121.XX. XX.77が使用されます。

  • ギガビットイーサネット0/1: このインターフェイスはデータセンタに接続し、IPアドレス192.168.50.217と形成されます。

VPC

プライマリCIDRブロック: 10.0.0.0/16

vSwitch 1: 10.0.10.0/24

vSwitch 2: 10.0.20.0/24

ECSインスタンスのIPアドレス: 10.0.10.33

パブリックVPNゲートウェイ

非該当

  • IPsecアドレス1: 39.XX. XX.218

  • IPsecアドレス2: 182.XX. XX.19

説明

VPNゲートウェイを作成すると、システムはVPNゲートウェイにIPアドレスを自動的に割り当てます。

BGP動的ルーティングのCIDRブロック計画

このトピックでは、静的ルーティングに加えて、Border Gateway Protocol (BGP) 動的ルーティングを使用するIPsec-VPN接続を確立するようにCiscoファイアウォールを設定する方法についても説明します。 BGP動的ルーティングを使用する必要がない場合は、このセクションをスキップしてください。 次の表に、BGP動的ルーティングのCIDRブロックプランを示します。

リソース

トンネル

BGPトンネルCIDRブロック

BGP IPアドレス

BGPローカルASN

VPN ゲートウェイ

トンネル1

169.254.10.0/30

説明

VPNゲートウェイでは、各トンネルのCIDRブロックは一意である必要があります。

169.254.10.1

65530

トンネル2

169.254.20.0/30

169.254.20.1

Ciscoファイアウォール

トンネル1

169.254.10.0/30

169.254.10.2

65000

トンネル2

169.254.20.0/30

169.254.20.2

サンプルVPN設定

  • この例では、トンネル1はアクティブトンネルであり、トンネル2はスタンバイトンネルである。 2つのトンネルは同じサンプル値を使用する。

  • Alibaba CloudとCiscoファイアウォールのVPN設定は、各トンネルで同じである必要があります。

パラメーター

Alibaba Cloudのサンプル値

Ciscoファイアウォールのサンプル値

事前共有キー

123456 ****

123456 ****

インターネットキー交換 (IKE) 設定

IKE バージョン

ikev2

ikev2

ネゴシエーションモード

メイン

メイン

暗号化アルゴリズム

aes

aes

認証アルゴリズム

sha1

sha1

Diffie-Hellman (DH) グループ

グループ14

グループ14

セキュリティアソシエーション (SA) の有効期間 (秒)

86400

86400

IPsec設定

暗号化アルゴリズム

aes

aes

認証アルゴリズム

sha1

sha1

DH グループ

グループ14

グループ14

SAの寿命 (秒)

86400

86400

手順

説明
  • この例では、ソフトウェア適応型セキュリティアプライアンス (ASA) 9.19.1を使用して、Ciscoファイアウォールを設定する方法を説明します。 コマンドはソフトウェアのバージョンによって異なります。 運用中は、実際の環境に基づいてドキュメントまたはベンダーを参照してください。

  • このシナリオでは、宛先ベースのルーティングモード-静的ルーティングまたは宛先ベースのルーティングモード-BGP動的ルーティングを使用することを推奨します。

宛先ベースのルーティングモード-静的ルーティング

前提条件

このトピックでは、VPN設定をCiscoファイアウォールに追加する方法についてのみ説明します。 Alibaba CloudでVPNゲートウェイを設定する手順は省略します。 Ciscoファイアウォールを設定する前に、VPNゲートウェイの作成、カスタマーゲートウェイの作成、IPsec-VPN接続の作成、およびVPNゲートウェイのルーティングの設定を完了していることを確認します。 詳細については、「デュアルトンネルモードでVPCをデータセンターに接続する」をご参照ください。

手順

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターネットアクセスのインターフェイス設定とルート設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    interface GigabitEthernet0/2                
     nameif outside2                            # The name of the GigabitEthernet 0/2 interface. 
     security-level 0
     ip address 121.XX.XX.77 255.255.255.255    # The public IP address of the GigabitEthernet 0/2 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172 # The route for accessing the public IP address of Tunnel 1 on Alibaba Cloud. The next hop is a public IP address. 
    route outside2 182.XX.XX.19 255.255.255.255 192.XX.XX.158   # The route for accessing the public IP address of Tunnel 2 on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv2機能を有効にします。

    crypto ikev2 enable outside1
    crypto ikev2 enable outside2
  4. IKEv2ポリシーを作成し、CiscoファイアウォールのIKEフェーズで認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev2 policy 10     
     encryption aes             # Specify the encryption algorithm. 
     integrity sha              # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     prf sha                    # The value of the prf parameter must be the same as that of the integrity parameter. By default, these values are the same on Alibaba Cloud. 
     lifetime seconds 86400     # Specify the SA lifetime.

  5. IPsecの提案とプロファイルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズム、認証アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev2 ipsec-proposal ALIYUN-PROPOSAL    # Create an IPsec proposal. 
     protocol esp encryption aes                         # Specify the encryption algorithm. The Encapsulating Security Payload (ESP) protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
     protocol esp integrity sha-1                        # Specify the authentication algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
    crypto ipsec profile ALIYUN-PROFILE                  
     set ikev2 ipsec-proposal ALIYUN-PROPOSAL            # Create an IPsec profile and apply the proposal that is created.  
     set ikev2 local-identity address                    # Set the format of the local ID to IP address, which is the same as the format of the remote ID on Alibaba Cloud. 
     set pfs group14                                     # Specify the Perfect Forward Secrecy (PFS) and DH group. 
     set security-association lifetime seconds 86400     # Specify the time-based SA lifetime. 
     set security-association lifetime kilobytes unlimited # Disable the traffic-based SA lifetime.

  6. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for Tunnel 1. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev2 remote-authentication pre-shared-key 123456****  # Specify the peer pre-shared key for Tunnel 1, which is the pre-shared key on Alibaba Cloud. 
     ikev2 local-authentication pre-shared-key 123456****   # Specify the local pre-shared key for Tunnel 1, which must be the same as that on Alibaba Cloud. 
    !
    tunnel-group 182.XX.XX.19 type ipsec-l2l                # Specify the encapsulation mode l2l for Tunnel 2. 
    tunnel-group 182.XX.XX.19 ipsec-attributes
     ikev2 remote-authentication pre-shared-key 123456****  # Specify the peer pre-shared key for Tunnel 2, which is the pre-shared key on Alibaba Cloud. 
     ikev2 local-authentication pre-shared-key 123456****   # Specify the local pre-shared key for Tunnel 2, which must be the same as that on Alibaba Cloud. 
    !
  7. トンネルインターフェイスを作成します。

    interface Tunnel1                                  # Create an interface for Tunnel 1. 
     nameif ALIYUN1
     ip address 169.254.10.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside1                  # Specify the IP address of the GigabitEthernet 0/0 interface as the source address of Tunnel 1. 
     tunnel destination 39.XX.XX.218                   # Specify the public IP address of Tunnel 1 on Alibaba Cloud as the destination address of Tunnel 1. 
     tunnel mode ipsec ipv4
     tunnel protection ipsec profile ALIYUN-PROFILE    # Apply the IPsec profile ALIYUN-PROFILE on Tunnel 1. 
     no shutdown                                       # Enable the interface for Tunnel 1. 
    !
    interface Tunnel2                                  # Create an interface for Tunnel 2. 
     nameif ALIYUN2                
     ip address 169.254.20.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside2                  # Specify the IP address of the GigabitEthernet 0/2 interface as the source address of Tunnel 2. 
     tunnel destination 182.XX.XX.19                   # Specify the public IP address of Tunnel 2 on Alibaba Cloud as the destination address of Tunnel 2. 
     tunnel mode ipsec ipv4                            
     tunnel protection ipsec profile ALIYUN-PROFILE # Apply the IPsec profile ALIYUN-PROFILE on Tunnel 2. 
     no shutdown                                       # Enable the interface for Tunnel 2. 
    !
  8. IPsec-VPN接続のステータスを表示します。

    次の図の赤で囲まれたコマンドを実行して、正常にネゴシエートされたSAを表示できます。IPsec-sa-1IPsec-sa-2

    その他のクエリコマンド

    IPsec SAネゴシエーションに関連するクエリコマンド

    show crypto isakmp sa # Display the negotiated SA information on the control plane. This is the command of the previous version.
    show crypto ikev2 sa  # Display the negotiated SA, role, and protected data flow in Phase 1 and Phase 2 on the control plane.
    show crypto ipsec sa peer XX.XX.XX.XX # Query the details of the specified peer SA.
    show ipsec sa         # Display basic information such as the SA, role, protected data flow, and traffic statistics in Phase 1 and Phase 2 on the forwarding plane.

    VPNトラフィック統計に関するクエリコマンド

    show crypto ikev2 stats     # Display the statistics on protocol packets, encrypted packets, and abnormal packets.
    show crypto protocol statistics all # Display the statistics on protocol packets and encrypted packets.
    show ipsec stats            # Display the IPsec statistics.
  9. Alibaba Cloud VPCを指す静的ルートを設定します (CIDRブロック: 10.0.0.0/16) 。

    route ALIYUN1 10.0.0.0 255.255.0.0 39.XX.XX.218 4  # Specify the route for forwarding traffic from the data center to the Alibaba Cloud VPC over the interface for Tunnel 1. This route has a higher priority. 
    route ALIYUN2 10.0.0.0 255.255.0.0 182.XX.XX.19 5  # Specify the route for forwarding traffic from the data center to the Alibaba Cloud VPC over the interface for Tunnel 2. The priority of this route is lower than that of the route that points to the interface for Tunnel 1.

  10. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「デュアルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。

宛先ベースのルーティングモード-BGP動的ルーティング

前提条件

このトピックでは、VPN設定をCiscoファイアウォールに追加する方法についてのみ説明します。 Alibaba CloudでVPNゲートウェイを設定する手順は省略します。 Ciscoファイアウォールを設定する前に、VPNゲートウェイの作成、カスタマーゲートウェイの作成、IPsec-VPN接続の作成、BGPの有効化のタスクが完了していることを確認します。 詳細については、「デュアルトンネルおよびBGPルーティングモードでVPCをデータセンターに接続する」をご参照ください。

手順

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターネットアクセスのインターフェイス設定とルート設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    interface GigabitEthernet0/2                
     nameif outside2                            # The name of the GigabitEthernet 0/2 interface. 
     security-level 0
     ip address 121.XX.XX.77 255.255.255.255    # The public IP address of the GigabitEthernet 0/2 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172 # The route for accessing the public IP address of Tunnel 1 on Alibaba Cloud. The next hop is a public IP address. 
    route outside2 182.XX.XX.19 255.255.255.255 192.XX.XX.158   # The route for accessing the public IP address of Tunnel 2 on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv2機能を有効にします。

    crypto ikev2 enable outside1
    crypto ikev2 enable outside2
  4. IKEv2ポリシーを作成し、CiscoファイアウォールのIKEフェーズで認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev2 policy 10     
     encryption aes             # Specify the encryption algorithm. 
     integrity sha              # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     prf sha                    # The value of the prf parameter must be the same as that of the integrity parameter. By default, these values are the same on Alibaba Cloud. 
     lifetime seconds 86400     # Specify the SA lifetime.

  5. IPsecの提案とプロファイルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズム、認証アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev2 ipsec-proposal ALIYUN-PROPOSAL    # Create an IPsec proposal. 
     protocol esp encryption aes                         # Specify the encryption algorithm. The Encapsulating Security Payload (ESP) protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
     protocol esp integrity sha-1                        # Specify the authentication algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
    crypto ipsec profile ALIYUN-PROFILE                  
     set ikev2 ipsec-proposal ALIYUN-PROPOSAL            # Create an IPsec profile and apply the proposal that is created.  
     set ikev2 local-identity address                    # Set the format of the local ID to IP address, which is the same as the format of the remote ID on Alibaba Cloud. 
     set pfs group14                                     # Specify the Perfect Forward Secrecy (PFS) and DH group. 
     set security-association lifetime seconds 86400     # Specify the time-based SA lifetime. 
     set security-association lifetime kilobytes unlimited # Disable the traffic-based SA lifetime.

  6. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for Tunnel 1. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev2 remote-authentication pre-shared-key 123456****  # Specify the peer pre-shared key for Tunnel 1, which is the pre-shared key on Alibaba Cloud. 
     ikev2 local-authentication pre-shared-key 123456****   # Specify the local pre-shared key for Tunnel 1, which must be the same as that on Alibaba Cloud. 
    !
    tunnel-group 182.XX.XX.19 type ipsec-l2l                # Specify the encapsulation mode l2l for Tunnel 2. 
    tunnel-group 182.XX.XX.19 ipsec-attributes
     ikev2 remote-authentication pre-shared-key 123456****  # Specify the peer pre-shared key for Tunnel 2, which is the pre-shared key on Alibaba Cloud. 
     ikev2 local-authentication pre-shared-key 123456****   # Specify the local pre-shared key for Tunnel 2, which must be the same as that on Alibaba Cloud. 
    !
  7. トンネルインターフェイスを作成します。

    interface Tunnel1                                  # Create an interface for Tunnel 1. 
     nameif ALIYUN1
     ip address 169.254.10.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside1                  # Specify the IP address of the GigabitEthernet 0/0 interface as the source address of Tunnel 1. 
     tunnel destination 39.XX.XX.218                   # Specify the public IP address of Tunnel 1 on Alibaba Cloud as the destination address of Tunnel 1. 
     tunnel mode ipsec ipv4
     tunnel protection ipsec profile ALIYUN-PROFILE    # Apply the IPsec profile ALIYUN-PROFILE on Tunnel 1. 
     no shutdown                                       # Enable the interface for Tunnel 1. 
    !
    interface Tunnel2                                  # Create an interface for Tunnel 2. 
     nameif ALIYUN2                
     ip address 169.254.20.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside2                  # Specify the IP address of the GigabitEthernet 0/2 interface as the source address of Tunnel 2. 
     tunnel destination 182.XX.XX.19                   # Specify the public IP address of Tunnel 2 on Alibaba Cloud as the destination address of Tunnel 2. 
     tunnel mode ipsec ipv4                            
     tunnel protection ipsec profile ALIYUN-PROFILE # Apply the IPsec profile ALIYUN-PROFILE on Tunnel 2. 
     no shutdown                                       # Enable the interface for Tunnel 2. 
    !
  8. IPsec-VPN接続のステータスを表示します。

    次の図の赤で囲まれたコマンドを実行して、正常にネゴシエートされたSAを表示できます。IPsec-sa-1IPsec-sa-2

    その他のクエリコマンド

    IPsec SAネゴシエーションに関連するクエリコマンド

    show crypto isakmp sa # Display the negotiated SA information on the control plane.
    show crypto ikev2 sa  # Display the negotiated SA, role, and protected data flow in Phase 1 and Phase 2 on the control plane.
    show crypto ipsec sa peer XX.XX.XX.XX # Query the details of the specified peer SA.
    show ipsec sa         # Display basic information such as the SA, role, protected data flow, and traffic statistics in Phase 1 and Phase 2 on the forwarding plane.

    VPNトラフィック統計に関するクエリコマンド

    show crypto ikev2 stats     # Display the statistics on protocol packets, encrypted packets, and abnormal packets.
    show crypto protocol statistics all # Display the statistics on protocol packets and encrypted packets.
    show ipsec stats            # Display the IPsec statistics.
  9. BGP動的ルーティングを設定します。

    router bgp 65000
     address-family ipv4 unicast
      neighbor 169.254.10.1 remote-as 65530       # Specify the BGP peer, which is the IP address of Tunnel 1 on Alibaba Cloud. 
      neighbor 169.254.10.1 ebgp-multihop 255
      neighbor 169.254.10.1 activate              # Activate the BGP peer. 
      neighbor 169.254.20.1 remote-as 65530       # Specify the BGP peer, which is the IP address of Tunnel 2 on Alibaba Cloud. 
      neighbor 169.254.20.1 ebgp-multihop 255
      neighbor 169.254.20.1 activate              # Activate the BGP peer. 
      network 192.168.0.0 mask 255.255.0.0 # Advertise the CIDR block of the data center. 
     exit-address-family
  10. BGPピアステータスとBGPルートを表示します。

    2024-07-18_13-35-41查看路由

  11. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「デュアルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。

保護されたデータフローモード-静的ルーティング

前提条件

このトピックでは、VPN設定をCiscoファイアウォールに追加する方法についてのみ説明します。 Alibaba CloudでVPNゲートウェイを設定する手順は省略します。 Ciscoファイアウォールを設定する前に、VPNゲートウェイの作成、カスタマーゲートウェイの作成、およびIPsec-VPN接続の作成というタスクが完了していることを確認してください。 詳細については、「デュアルトンネルモードでVPCをデータセンターに接続する」をご参照ください。

  • IPsec-VPN接続を作成するときに、ルーティングモードパラメーターを保護されたデータフローに、ローカルネットワークパラメーターを10.0.0.0/16に、リモートネットワークパラメーターを192.168.0.0/16に設定します。

    重要

    複数のローカルCIDRブロックまたはピアCIDRブロックを指定する必要があるシナリオでは、宛先ベースのルーティングモード-静的ルーティングまたは宛先ベースのルーティングモード-BGP動的ルーティングを使用することを推奨します。 詳細については、「CIDRブロック間の通信の有効化に関する設定の提案とFAQ」トピックの「推奨ソリューション」セクションをご参照ください。

  • IPsec-VPN接続が作成されたら、ポリシーベースのルートをアドバタイズする必要があります。 詳細については、「ポリシーベースのルートの設定」トピックの「ポリシーベースのルートの広告」セクションをご参照ください。 宛先ベースのルート設定は必要ありません。

手順

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターネットアクセスのインターフェイス設定とルート設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    interface GigabitEthernet0/2                
     nameif outside2                            # The name of the GigabitEthernet 0/2 interface. 
     security-level 0
     ip address 121.XX.XX.77 255.255.255.255    # The public IP address of the GigabitEthernet 0/2 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172 # The route for accessing the public IP address of Tunnel 1 on Alibaba Cloud. The next hop is a public IP address. 
    route outside2 182.XX.XX.19 255.255.255.255 192.XX.XX.158   # The route for accessing the public IP address of Tunnel 2 on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv2機能を有効にします。

    crypto ikev2 enable outside1
    crypto ikev2 enable outside2
  4. IKEv2ポリシーを作成し、CiscoファイアウォールのIKEフェーズで認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev2 policy 10     
     encryption aes             # Specify the encryption algorithm. 
     integrity sha              # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     prf sha                    # The value of the prf parameter must be the same as that of the integrity parameter. By default, these values are the same on Alibaba Cloud. 
     lifetime seconds 86400     # Specify the SA lifetime.

  5. IPsecプロポーザルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズムと認証アルゴリズムを指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev2 ipsec-proposal ALIYUN-PROPOSAL    # Create an IPsec proposal. 
     protocol esp encryption aes                         # Specify the encryption algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
     protocol esp integrity sha-1                        # Specify the authentication algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol.

  6. 保護されたデータフローを定義します。

    IPsec-VPN接続でトラフィックを送信できるCIDRブロックを指定します。 この例では、データセンターのCIDRブロック192.168.0.0/16は、Alibaba Cloud VPCのCIDRブロック10.0.0.0/16と通信できます。

    access-list acl_tun extended permit ip 192.168.0.0 255.255.0.0 10.0.0.0 255.255.0.0
  7. IPsecポリシーを作成します。

    # Create an IPsec policy for Tunnel 1.
    crypto map TUNL1 1 match address acl_tun                      # Apply the protected data flows that are defined. 
    crypto map TUNL1 1 set pfs group14 # Specify the DH group. 	
    crypto map TUNL1 1 set peer 39.XX.XX.218                      # Specify the peer ID, which is the IPsec address 1 on Alibaba Cloud. 
    crypto map TUNL1 1 set ikev2 ipsec-proposal ALIYUN-PROPOSAL   # Apply the IPsec proposal. 
    crypto map TUNL1 1 set ikev2 pre-shared-key 0 123456****      # Specify the pre-shared key, which must be the same as that specified in the tunnel-group command. 
    crypto map TUNL1 1 set security-association lifetime seconds  86400             # Specify the time-based IPsec SA lifetime. 
    crypto map TUNL1 1 set security-association lifetime kilobytes unlimited        # Disable the traffic-based IPsec SA lifetime. 
    crypto map TUNL1 interface outside1                                             # Apply the IPsec policy to the public interface GigabitEthernet 0/0. 
    !
    # Create an IPsec policy for Tunnel 2.
    crypto map TUNL2 1 match address acl_tun                      # Apply the protected data flows that are defined. 
    crypto map TUNL2 1 set pfs group14                            # Specify the DH group. 	
    crypto map TUNL2 1 set peer 182.XX.XX.19                      # Specify the peer ID, which is the IPsec address 2 on Alibaba Cloud. 
    crypto map TUNL2 1 set ikev2 ipsec-proposal ALIYUN-PROPOSAL   # Apply the IPsec proposal. 
    crypto map TUNL2 1 set ikev2 pre-shared-key 0 123456****      # Specify the pre-shared key, which must be the same as that specified in the tunnel-group command. 
    crypto map TUNL2 1 set security-association lifetime seconds  86400             # Specify the time-based IPsec SA lifetime. 
    crypto map TUNL2 1 set security-association lifetime kilobytes unlimited        # Disable the traffic-based IPsec SA lifetime. 
    crypto map TUNL2 interface outside2                                             # Apply the IPsec policy to the public interface GigabitEthernet 0/2. 
    
    !
  8. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for Tunnel 1. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev2 remote-authentication pre-shared-key 123456****  # Specify the peer pre-shared key for Tunnel 1, which is the pre-shared key on Alibaba Cloud. 
     ikev2 local-authentication pre-shared-key 123456****   # Specify the local pre-shared key for Tunnel 1, which must be the same as that on Alibaba Cloud. 
    !
    tunnel-group 182.XX.XX.19 type ipsec-l2l                # Specify the encapsulation mode l2l for Tunnel 2. 
    tunnel-group 182.XX.XX.19 ipsec-attributes
     ikev2 remote-authentication pre-shared-key 123456****  # Specify the peer pre-shared key for Tunnel 2, which is the pre-shared key on Alibaba Cloud. 
     ikev2 local-authentication pre-shared-key 123456****   # Specify the local pre-shared key for Tunnel 2, which must be the same as that on Alibaba Cloud. 
    !
  9. IPsec-VPN接続のステータスを表示します。

    次の図の赤で囲まれたコマンドを実行して、正常にネゴシエートされたSAを表示できます。策略路由SA策略路由SA2

    その他のクエリコマンド

    IPsec SAネゴシエーションに関連するクエリコマンド

    show crypto isakmp sa # Display the negotiated SA information on the control plane.
    show crypto ikev2 sa  # Display the negotiated SA, role, and protected data flow in Phase 1 and Phase 2 on the control plane.
    show crypto ipsec sa peer XX.XX.XX.XX # Query the details of the specified peer SA.
    show ipsec sa         # Display basic information such as the SA, role, protected data flow, and traffic statistics in Phase 1 and Phase 2 on the forwarding plane.

    VPNトラフィック統計に関するクエリコマンド

    show crypto ikev2 stats     # Display the statistics on protocol packets, encrypted packets, and abnormal packets.
    show crypto protocol statistics all # Display the statistics on protocol packets and encrypted packets.
    show ipsec stats            # Display the IPsec statistics.
  10. Alibaba Cloud VPCを指すフローティング静的ルートを設定します (CIDRブロック: 10.0.0.0/16) 。

    sla monitor 1                                                  # Define an SLA operation that is numbered 1. 
     type echo protocol ipIcmpEcho 10.0.10.33 interface outside1   # Perform the ICMP echo test between the outside1 interface and the IP address 10.0.10.33 on Alibaba Cloud. 
     num-packets 2
     timeout 60
     frequency 5
    sla monitor schedule 1 life forever start-time now             # Start SLA 1 immediately for permanent operation. 
    
    track 1 rtr 1 reachability                                     # Create Track 1, associate it with  SLA 1, and test the connectivity between the outside1 interface and the IP address 10.0.10.33 on Alibaba Cloud.
    
    # If the track traces that the connectivity is DOWN, this route is withdrawn. 
    # If the track traces that the connectivity is UP, this route is added. 
    route outside1 10.0.0.0 255.255.0.0 39.XX.XX.218 1 track 1     
    route outside2 10.0.0.0 255.255.0.0 182.XX.XX.19 5
  11. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「デュアルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。

IKEv1の設定例

CiscoファイアウォールでIKEv1バージョンが必要な場合は、このセクションの説明に基づいてCiscoファイアウォールを設定できます。

次の設定を使用してAlibaba CloudへのIPsec-VPN接続を確立する場合、Alibaba CloudのIPsec-VPN接続が宛先ベースのルーティングとIKEv1を使用していることを確認してください。

宛先ベースのルーティングモード-静的ルーティング

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターネットアクセスのインターフェイス設定とルート設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    interface GigabitEthernet0/2                
     nameif outside2                            # The name of the GigabitEthernet 0/2 interface. 
     security-level 0
     ip address 121.XX.XX.77 255.255.255.255    # The public IP address of the GigabitEthernet 0/2 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172 # The route for accessing the public IP address of Tunnel 1 on Alibaba Cloud. The next hop is a public IP address. 
    route outside2 182.XX.XX.19 255.255.255.255 192.XX.XX.158   # The route for accessing the public IP address of Tunnel 2 on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv1機能を有効にします。

    crypto ikev1 enable outside1
    crypto ikev1 enable outside2
  4. IKEv1ポリシーを作成し、CiscoファイアウォールのIKEフェーズで検証方法と認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev1 policy 10   
     authentication pre-share   # Specify the pre-shared key as the verification method. 
     encryption aes             # Specify the encryption algorithm. 
     hash sha                   # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     lifetime 86400             # Specify the time-based SA lifetime.

  5. IPsec変換セットとプロファイルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズム、認証アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev1 transform-set TRANSFORM esp-aes esp-sha-hmac  # Create an IPsec transform set and specify the encryption algorithm and authentication algorithm. 
    crypto ipsec profile ALIYUN-PROFILE                  
     set ikev1 transform-set TRANSFORM                               # Apply the transform set that is created. 
     set pfs group14                                                 # Specify the PFS and DH group. 
     set security-association lifetime seconds 86400                 # Specify the time-based SA lifetime. 
     set security-association lifetime kilobytes unlimited           # Disable the traffic-based SA lifetime. 
    
    crypto isakmp identity address                                   # Set the format of the fully qualified domain name (FQDN) to IP address.

  6. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for Tunnel 1. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev1 pre-shared-key 123456****                        # Specify the peer pre-shared key for Tunnel 1, which is the pre-shared key on Alibaba Cloud. 
    !
    tunnel-group 182.XX.XX.19 type ipsec-l2l                # Specify the encapsulation mode l2l for Tunnel 2. 
    tunnel-group 182.XX.XX.19 ipsec-attributes         
     ikev1 pre-shared-key 123456****                        # Specify the peer pre-shared key for Tunnel 2, which is the pre-shared key on Alibaba Cloud. 
    !
  7. トンネルインターフェイスを作成します。

    interface Tunnel1                                  # Create an interface for Tunnel 1. 
     nameif ALIYUN1
     ip address 169.254.10.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside1                  # Specify the IP address of the GigabitEthernet 0/0 interface as the source address of Tunnel 1. 
     tunnel destination 39.XX.XX.218                   # Specify the public IP address of Tunnel 1 on Alibaba Cloud as the destination address of Tunnel 1. 
     tunnel mode ipsec ipv4
     tunnel protection ipsec profile ALIYUN-PROFILE    # Apply the IPsec profile ALIYUN-PROFILE on Tunnel 1. 
     no shutdown                                       # Enable the interface for Tunnel 1. 
    !
    interface Tunnel2                                  # Create an interface for Tunnel 2. 
     nameif ALIYUN2                
     ip address 169.254.20.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside2                  # Specify the IP address of the GigabitEthernet 0/2 interface as the source address of Tunnel 2. 
     tunnel destination 182.XX.XX.19                   # Specify the public IP address of Tunnel 2 on Alibaba Cloud as the destination address of Tunnel 2. 
     tunnel mode ipsec ipv4                            
     tunnel protection ipsec profile ALIYUN-PROFILE # Apply the IPsec profile ALIYUN-PROFILE on Tunnel 2. 
     no shutdown                                       # Enable the interface for Tunnel 2. 
    !
  8. Alibaba Cloud VPCを指す静的ルートを設定します (CIDRブロック: 10.0.0.0/16) 。

    route ALIYUN1 10.0.0.0 255.255.0.0 39.XX.XX.218 4  # Specify the route for forwarding traffic from the data center to the Alibaba Cloud VPC over the interface for Tunnel 1. This route has a higher priority. 
    route ALIYUN2 10.0.0.0 255.255.0.0 182.XX.XX.19 5  # Specify the route for forwarding traffic from the data center to the Alibaba Cloud VPC over the interface for Tunnel 2. The priority of this route is lower than that of the route that points to the interface for Tunnel 1.

  9. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「デュアルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。

宛先ベースのルーティングモード-BGP動的ルーティング

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターネットアクセスのインターフェイス設定とルート設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    interface GigabitEthernet0/2                
     nameif outside2                            # The name of the GigabitEthernet 0/2 interface. 
     security-level 0
     ip address 121.XX.XX.77 255.255.255.255    # The public IP address of the GigabitEthernet 0/2 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172 # The route for accessing the public IP address of Tunnel 1 on Alibaba Cloud. The next hop is a public IP address. 
    route outside2 182.XX.XX.19 255.255.255.255 192.XX.XX.158   # The route for accessing the public IP address of Tunnel 2 on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv1機能を有効にします。

    crypto ikev1 enable outside1
    crypto ikev1 enable outside2
  4. IKEv1ポリシーを作成し、CiscoファイアウォールのIKEフェーズで検証方法と認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev1 policy 10   
     authentication pre-share   # Specify the pre-shared key as the verification method. 
     encryption aes             # Specify the encryption algorithm. 
     hash sha                   # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     lifetime 86400             # Specify the time-based SA lifetime.

  5. IPsec変換セットとプロファイルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズム、認証アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev1 transform-set TRANSFORM esp-aes esp-sha-hmac  # Create an IPsec transform set and specify the encryption algorithm and authentication algorithm. 
    crypto ipsec profile ALIYUN-PROFILE                  
     set ikev1 transform-set TRANSFORM                               # Apply the transform set that is created. 
     set pfs group14                                                 # Specify the PFS and DH group. 
     set security-association lifetime seconds 86400                 # Specify the time-based SA lifetime. 
     set security-association lifetime kilobytes unlimited           # Disable the traffic-based SA lifetime. 
    
    crypto isakmp identity address                                   # Set the format of the fully qualified domain name (FQDN) to IP address.

  6. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for Tunnel 1. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev1 pre-shared-key 123456****                        # Specify the peer pre-shared key for Tunnel 1, which is the pre-shared key on Alibaba Cloud. 
    !
    tunnel-group 182.XX.XX.19 type ipsec-l2l                # Specify the encapsulation mode l2l for Tunnel 2. 
    tunnel-group 182.XX.XX.19 ipsec-attributes         
     ikev1 pre-shared-key 123456****                        # Specify the peer pre-shared key for Tunnel 2, which is the pre-shared key on Alibaba Cloud. 
    !
  7. トンネルインターフェイスを作成します。

    interface Tunnel1                                  # Create an interface for Tunnel 1. 
     nameif ALIYUN1
     ip address 169.254.10.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside1                  # Specify the IP address of the GigabitEthernet 0/0 interface as the source address of Tunnel 1. 
     tunnel destination 39.XX.XX.218                   # Specify the public IP address of Tunnel 1 on Alibaba Cloud as the destination address of Tunnel 1. 
     tunnel mode ipsec ipv4
     tunnel protection ipsec profile ALIYUN-PROFILE    # Apply the IPsec profile ALIYUN-PROFILE on Tunnel 1. 
     no shutdown                                       # Enable the interface for Tunnel 1. 
    !
    interface Tunnel2                                  # Create an interface for Tunnel 2. 
     nameif ALIYUN2                
     ip address 169.254.20.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside2                  # Specify the IP address of the GigabitEthernet 0/2 interface as the source address of Tunnel 2. 
     tunnel destination 182.XX.XX.19                   # Specify the public IP address of Tunnel 2 on Alibaba Cloud as the destination address of Tunnel 2. 
     tunnel mode ipsec ipv4                            
     tunnel protection ipsec profile ALIYUN-PROFILE # Apply the IPsec profile ALIYUN-PROFILE on Tunnel 2. 
     no shutdown                                       # Enable the interface for Tunnel 2. 
    !
  8. BGP動的ルーティングを設定します。

    router bgp 65000
     address-family ipv4 unicast
      neighbor 169.254.10.1 remote-as 65530       # Specify the BGP peer, which is the IP address of Tunnel 1 on Alibaba Cloud. 
      neighbor 169.254.10.1 ebgp-multihop 255
      neighbor 169.254.10.1 activate              # Activate the BGP peer. 
      neighbor 169.254.20.1 remote-as 65530       # Specify the BGP peer, which is the IP address of Tunnel 2 on Alibaba Cloud. 
      neighbor 169.254.20.1 ebgp-multihop 255
      neighbor 169.254.20.1 activate              # Activate the BGP peer. 
      network 192.168.0.0 mask 255.255.0.0 # Advertise the CIDR block of the data center. 
     exit-address-family
  9. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「デュアルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。

単一のトンネルを使用するようにCiscoファイアウォールを設定する

単一のトンネルを使用するようにCiscoファイアウォールを設定する

シナリオ

image

この例では、企業がAlibaba CloudにVPCをデプロイしています。 VPCのCIDRブロックは10.0.0.0/16です。 アプリケーションはVPCのECSインスタンスにデプロイされます。 同社には、VPCと通信するためにCIDRブロック192.168.0.0/16を使用する必要があるデータセンターがあります。 同社は、相互リソースアクセスを実装するために、データセンターとクラウド上のVPC間にIPsec-VPN接続を確立したいと考えています。

CIDRブロックプランとサンプルVPN設定

CIDRブロックプラン

リソース

CIDRブロック

IPアドレス

データセンター

VPCと通信する必要があるCIDRブロック: 192.168.0.0/16

サーバーIPアドレス: 192.168.50.198

Ciscoファイアウォール

非該当

Ciscoファイアウォールでインターネットに接続する物理インターフェイス:

  • GigabitEthernet 0/0: このインターフェイスはパブリックIPアドレスで設定されています。 この例では、39.XX. XX.XX.218が使用されます。

  • ギガビットイーサネット0/1: このインターフェイスはデータセンタに接続し、IPアドレス192.168.50.217と形成されます。

VPC

プライマリCIDRブロック: 10.0.0.0/16

vSwitch 1: 10.0.10.0/24

vSwitch 2: 10.0.20.0/24

ECSインスタンスのIPアドレス: 10.0.10.33

パブリックVPNゲートウェイ

非該当

VPNゲートウェイのパブリックIPアドレス: 39.XX. XX.218

説明

VPNゲートウェイを作成すると、システムはVPNゲートウェイにIPアドレスを自動的に割り当てます。

BGP動的ルーティングのCIDRブロックプラン

このトピックでは、静的ルーティングに加えて、BGP動的ルーティングを使用するIPsec-VPN接続を確立するようにCiscoファイアウォールを設定する方法についても説明します。 BGP動的ルーティングを使用する必要がない場合は、このセクションをスキップしてください。 次の表に、BGP動的ルーティングのCIDRブロックプランを示します。

リソース

BGPトンネルCIDRブロック

BGP IPアドレス

BGPローカルASN

VPN ゲートウェイ

169.254.10.0/30

説明

VPNゲートウェイでは、各トンネルのCIDRブロックは一意である必要があります。

169.254.10.1

65530

Ciscoファイアウォール

169.254.10.0/30

169.254.10.2

65000

サンプルVPN設定

Alibaba CloudとCiscoファイアウォールのVPN設定は同じである必要があります。

パラメーター

Alibaba Cloudのサンプル値

Ciscoファイアウォールのサンプル値

事前共有キー

123456 ****

123456 ****

IKE設定

IKE バージョン

ikev2

ikev2

ネゴシエーションモード

メイン

メイン

暗号化アルゴリズム

aes

aes

認証アルゴリズム

sha1

sha1

DH グループ

グループ14

グループ14

SAの寿命 (秒)

86400

86400

IPsec設定

暗号化アルゴリズム

aes

aes

認証アルゴリズム

sha1

sha1

DH グループ

グループ14

グループ14

SAの寿命 (秒)

86400

86400

手順

説明
  • この例では、ソフトウェア適応型セキュリティアプライアンス (ASA) 9.19.1を使用して、Ciscoファイアウォールを設定する方法を説明します。 コマンドはソフトウェアのバージョンによって異なります。 運用中は、実際の環境に基づいてドキュメントまたはベンダーを参照してください。

  • このシナリオでは、宛先ベースのルーティングモード-静的ルーティングまたは宛先ベースのルーティングモード-BGP動的ルーティングを使用することを推奨します。

宛先ベースのルーティングモード-静的ルーティング

前提条件

このトピックでは、VPN設定をCiscoファイアウォールに追加する方法についてのみ説明します。 Alibaba CloudでVPNゲートウェイを設定する手順は省略します。 Ciscoファイアウォールを設定する前に、VPNゲートウェイの作成、カスタマーゲートウェイの作成、IPsec-VPN接続の作成、およびVPNゲートウェイのルーティングの設定を完了していることを確認します。 詳細については、「シングルトンネルモードでVPCをデータセンターに接続する」をご参照ください。

手順

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターネットアクセスのインターフェイス設定とルート設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172   # The route for accessing the public IP address of the VPN gateway on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv2機能を有効にします。

    crypto ikev2 enable outside1
  4. IKEv2ポリシーを作成し、CiscoファイアウォールのIKEフェーズで認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev2 policy 10     
     encryption aes             # Specify the encryption algorithm. 
     integrity sha              # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     prf sha                    # The value of the prf parameter must be the same as that of the integrity parameter. By default, these values are the same on Alibaba Cloud. 
     lifetime seconds 86400     # Specify the SA lifetime.

  5. IPsecの提案とプロファイルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズム、認証アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev2 ipsec-proposal ALIYUN-PROPOSAL    # Create an IPsec proposal. 
     protocol esp encryption aes                         # Specify the encryption algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
     protocol esp integrity sha-1                        # Specify the authentication algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
    crypto ipsec profile ALIYUN-PROFILE                  
     set ikev2 ipsec-proposal ALIYUN-PROPOSAL            # Create an IPsec profile and apply the proposal that is created.  
     set ikev2 local-identity address                    # Set the format of the local ID to IP address, which is the same as the format of the remote ID on Alibaba Cloud. 
     set pfs group14                                     # Specify the PFS and DH group. 
     set security-association lifetime seconds 86400     # Specify the time-based SA lifetime. 
     set security-association lifetime kilobytes unlimited # Disable the traffic-based SA lifetime.

  6. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for the tunnel. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev2 remote-authentication pre-shared-key 123456****  # Specify the peer pre-shared key for the tunnel, which is the pre-shared key on Alibaba Cloud. 
     ikev2 local-authentication pre-shared-key 123456****   # Specify the local pre-shared key for the tunnel, which must be the same as that on Alibaba Cloud. 
    !
  7. トンネルインターフェイスを作成します。

    interface Tunnel1                                  # Create an interface for the tunnel. 
     nameif ALIYUN1
     ip address 169.254.10.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside1                  # Specify the IP address of the GigabitEthernet 0/0 interface as the source address of the tunnel. 
     tunnel destination 39.XX.XX.218                   # Specify the public IP address of the VPN gateway on Alibaba Cloud as the destination address of the tunnel. 
     tunnel mode ipsec ipv4
     tunnel protection ipsec profile ALIYUN-PROFILE # Apply the IPsec profile ALIYUN-PROFILE on the tunnel. 
     no shutdown                                       # Enable the interface for the tunnel. 
    !
  8. Alibaba Cloud VPCを指す静的ルートを設定します (CIDRブロック: 10.0.0.0/16) 。

    route ALIYUN1 10.0.0.0 255.255.0.0 39.XX.XX.218 
  9. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「シングルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。

宛先ベースのルーティングモード-BGP動的ルーティング

前提条件

このトピックでは、VPN設定をCiscoファイアウォールに追加する方法についてのみ説明します。 Alibaba CloudでVPNゲートウェイを設定する手順は省略します。 Ciscoファイアウォールを設定する前に、VPNゲートウェイの作成、カスタマーゲートウェイの作成、IPsec-VPN接続の作成、BGPの有効化のタスクが完了していることを確認します。 詳細については、「シングルトンネルモードでIPsec-VPN接続を使用してVPCをデータセンターに接続し、BGPルーティングを有効にする」をご参照ください。

手順

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターネットアクセスのインターフェイス設定とルート設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172   # The route for accessing the public IP address of the VPN gateway on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv2機能を有効にします。

    crypto ikev2 enable outside1
  4. IKEv2ポリシーを作成し、CiscoファイアウォールのIKEフェーズで認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev2 policy 10     
     encryption aes             # Specify the encryption algorithm. 
     integrity sha              # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     prf sha                    # The value of the prf parameter must be the same as that of the integrity parameter. By default, these values are the same on Alibaba Cloud. 
     lifetime seconds 86400     # Specify the SA lifetime.

  5. IPsecの提案とプロファイルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズム、認証アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev2 ipsec-proposal ALIYUN-PROPOSAL    # Create an IPsec proposal. 
     protocol esp encryption aes                         # Specify the encryption algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
     protocol esp integrity sha-1                        # Specify the authentication algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
    crypto ipsec profile ALIYUN-PROFILE                  
     set ikev2 ipsec-proposal ALIYUN-PROPOSAL            # Create an IPsec profile and apply the proposal that is created.  
     set ikev2 local-identity address                    # Set the format of the local ID to IP address, which is the same as the format of the remote ID on Alibaba Cloud. 
     set pfs group14                                     # Specify the PFS and DH group. 
     set security-association lifetime seconds 86400     # Specify the time-based SA lifetime. 
     set security-association lifetime kilobytes unlimited # Disable the traffic-based SA lifetime.

  6. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for the tunnel. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev2 remote-authentication pre-shared-key 123456****  # Specify the peer pre-shared key for the tunnel, which is the pre-shared key on Alibaba Cloud. 
     ikev2 local-authentication pre-shared-key 123456****   # Specify the local pre-shared key for the tunnel, which must be the same as that on Alibaba Cloud. 
    !
  7. トンネルインターフェイスを作成します。

    interface Tunnel1                                  # Create an interface for the tunnel. 
     nameif ALIYUN1
     ip address 169.254.10.2 255.255.255.252           # Specify the IP address of the interface. 
     tunnel source interface outside1                  # Specify the IP address of the GigabitEthernet 0/0 interface as the source address of the tunnel. 
     tunnel destination 39.XX.XX.218                   # Specify the public IP address of the VPN gateway on Alibaba Cloud as the destination address of the tunnel. 
     tunnel mode ipsec ipv4
     tunnel protection ipsec profile ALIYUN-PROFILE # Apply the IPsec profile ALIYUN-PROFILE on the tunnel. 
     no shutdown                                       # Enable the interface for the tunnel. 
    !
  8. BGP動的ルーティングを設定します。

    router bgp 65000
     address-family ipv4 unicast
      neighbor 169.254.10.1 remote-as 65530       # Specify the BGP peer, which is the BGP IP address of the tunnel on Alibaba Cloud. 
      neighbor 169.254.10.1 ebgp-multihop 255
      neighbor 169.254.10.1 activate              # Activate the BGP peer. 
      network 192.168.0.0 mask 255.255.0.0 # Advertise the CIDR block of the data center. 
     exit-address-family
  9. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「シングルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。

保護されたデータフローモード-静的ルーティング

前提条件

このトピックでは、VPN設定をCiscoファイアウォールに追加する方法についてのみ説明します。 Alibaba CloudでVPNゲートウェイを設定する手順は省略します。 Ciscoファイアウォールを設定する前に、VPNゲートウェイの作成、カスタマーゲートウェイの作成、およびIPsec-VPN接続の作成というタスクが完了していることを確認してください。 詳細については、「シングルトンネルモードでVPCをデータセンターに接続する」をご参照ください。

  • IPsec-VPN接続を作成するときに、ルーティングモードパラメーターを保護されたデータフローに、ローカルネットワークパラメーターを10.0.0.0/16に、リモートネットワークパラメーターを192.168.0.0/16に設定します。

    重要

    複数のローカルCIDRブロックまたはピアCIDRブロックを指定する必要があるシナリオでは、宛先ベースのルーティングモード-静的ルーティングまたは宛先ベースのルーティングモード-BGP動的ルーティングを使用することを推奨します。 詳細については、「CIDRブロック間の通信の有効化に関する設定の提案とFAQ」トピックの「推奨ソリューション」セクションをご参照ください。

  • IPsec-VPN接続が作成されたら、ポリシーベースのルートをアドバタイズする必要があります。 詳細については、「ポリシーベースのルートの設定」トピックの「ポリシーベースのルートの広告」セクションをご参照ください。 宛先ベースのルート設定は必要ありません。

手順

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターフェイスの設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172   # The route for accessing the public IP address of the VPN gateway on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv2機能を有効にします。

    crypto ikev2 enable outside1
  4. IKEv2ポリシーを作成し、CiscoファイアウォールのIKEフェーズで認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev2 policy 10     
     encryption aes             # Specify the encryption algorithm. 
     integrity sha              # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     prf sha                    # The value of the prf parameter must be the same as that of the integrity parameter. By default, these values are the same on Alibaba Cloud. 
     lifetime seconds 86400     # Specify the SA lifetime.

  5. IPsecプロポーザルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズムと認証アルゴリズムを指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev2 ipsec-proposal ALIYUN-PROPOSAL    # Create an IPsec proposal. 
     protocol esp encryption aes                         # Specify the encryption algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol. 
     protocol esp integrity sha-1                        # Specify the authentication algorithm. The ESP protocol is used on Alibaba Cloud. Therefore, use the ESP protocol.

  6. 保護されたデータフローを定義します。

    IPsec-VPN接続でトラフィックを送信できるCIDRブロックを指定します。 この例では、データセンターのCIDRブロック192.168.0.0/16は、Alibaba Cloud VPCのCIDRブロック10.0.0.0/16と通信できます。

    access-list acl_tun extended permit ip 192.168.0.0 255.255.0.0 10.0.0.0 255.255.0.0
  7. IPsecポリシーを作成します。

    # Create an IPsec policy for the tunnel.
    crypto map TUNL1 1 match address acl_tun                      # Apply the protected data flows that are defined. 
    crypto map TUNL1 1 set pfs group14 # Specify the DH group. 	
    crypto map TUNL1 1 set peer 39.XX.XX.218                      # Specify the peer ID, which is the public IP address of the VPN gateway on Alibaba Cloud. 
    crypto map TUNL1 1 set ikev2 ipsec-proposal ALIYUN-PROPOSAL   # Apply the IPsec proposal. 
    crypto map TUNL1 1 set ikev2 pre-shared-key 0 123456****      # Specify the pre-shared key, which must be the same as that specified in the tunnel-group command. 
    crypto map TUNL1 1 set security-association lifetime seconds  86400             # Specify the time-based IPsec SA lifetime. 
    crypto map TUNL1 1 set security-association lifetime kilobytes unlimited        # Disable the traffic-based IPsec SA lifetime. 
    crypto map TUNL1 interface outside1                                             # Apply the IPsec policy to the public interface GigabitEthernet 0/0. 
    !
  8. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for the tunnel. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev2 remote-authentication pre-shared-key 123456****  # Specify the peer pre-shared key for the tunnel, which is the pre-shared key on Alibaba Cloud. 
     ikev2 local-authentication pre-shared-key 123456****   # Specify the local pre-shared key for the tunnel, which must be the same as that on Alibaba Cloud. 
    !
  9. Alibaba Cloud VPCを指す静的ルートを設定します (CIDRブロック: 10.0.0.0/16) 。

    route outside1 10.0.0.0 255.255.0.0 39.XX.XX.218
  10. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「シングルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。

IKEv1の設定例

CiscoファイアウォールでIKEv1バージョンが必要な場合は、このセクションの説明に基づいてCiscoファイアウォールを設定できます。

次の設定を使用してAlibaba CloudへのIPsec-VPN接続を確立する場合、Alibaba CloudのIPsec-VPN接続が宛先ベースのルーティングとIKEv1を使用していることを確認してください。

宛先ベースのルーティングモード-静的ルーティング

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターフェイスの設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172   # The route for accessing the public IP address of the VPN gateway on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv1機能を有効にします。

    crypto ikev1 enable outside1
  4. IKEv1ポリシーを作成し、CiscoファイアウォールのIKEフェーズで検証方法と認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev1 policy 10   
     authentication pre-share   # Specify the pre-shared key as the verification method. 
     encryption aes             # Specify the encryption algorithm. 
     hash sha                   # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     lifetime 86400             # Specify the time-based SA lifetime.

  5. IPsec変換セットとプロファイルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズム、認証アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev1 transform-set TRANSFORM esp-aes esp-sha-hmac  # Create an IPsec transform set and specify the encryption algorithm and authentication algorithm. 
    crypto ipsec profile ALIYUN-PROFILE                  
     set ikev1 transform-set TRANSFORM                               # Apply the transform set that is created. 
     set pfs group14                                                 # Specify the PFS and DH group. 
     set security-association lifetime seconds 86400                 # Specify the time-based SA lifetime. 
     set security-association lifetime kilobytes unlimited           # Disable the traffic-based SA lifetime. 
    
    crypto isakmp identity address                                   # Set the format of the fully qualified domain name (FQDN) to IP address.

  6. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for the tunnel. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev1 pre-shared-key 123456****                        # Specify the peer pre-shared key for the tunnel, which is the pre-shared key on Alibaba Cloud. 
    !
  7. トンネルインターフェイスを作成します。

    interface Tunnel1                                  # Create an interface for the tunnel. 
     nameif ALIYUN1
     ip address 169.254.10.2 255.255.255.252           # Specify the IP address of the interface for the tunnel. 
     tunnel source interface outside1                  # Specify the IP address of the GigabitEthernet 0/0 interface as the source address of the tunnel. 
     tunnel destination 39.XX.XX.218                   # Specify the public IP address for the VPN gateway on Alibaba Cloud as the destination address of the tunnel. 
     tunnel mode ipsec ipv4
     tunnel protection ipsec profile ALIYUN-PROFILE # Apply the IPsec profile ALIYUN-PROFILE on the tunnel. 
     no shutdown                                       # Enable the interface for the tunnel. 
    !
  8. Alibaba Cloud VPCを指す静的ルートを設定します (CIDRブロック: 10.0.0.0/16) 。

    route ALIYUN1 10.0.0.0 255.255.0.0 39.XX.XX.218   
  9. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「シングルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。

宛先ベースのルーティングモード-BGP動的ルーティング

  1. CiscoファイアウォールのCLIにログインし、設定モードを入力します。

    ciscoasa> enable
    Password: ********             # Enter the password for entering the enable mode. 
    ciscoasa# configure terminal   # Enter the configuration mode. 
    ciscoasa(config)#     
  2. インターフェイスの設定を表示します。

    インターフェイスが設定され、Ciscoファイアウォールで有効になっていることを確認します。 この例では、次のインターフェイス設定が使用されます。

    ciscoasa(config)# show running-config interface 
    !
    interface GigabitEthernet0/0
     nameif outside1                            # The name of the GigabitEthernet 0/0 interface. 
     security-level 0
     ip address 121.XX.XX.211 255.255.255.255    # The public IP address of the GigabitEthernet 0/0 interface. 
    !
    interface GigabitEthernet0/1                # The interface that connects to the data center. 
     nameif private                             # The name of the GigabitEthernet 0/1 interface. 
     security-level 100                         # The security level of the private interface that connects to the data center, which is lower than that of a public interface. 
     ip address 192.168.50.217 255.255.255.0    # The IP address of the GigabitEthernet 0/1 interface. 
    !
    
    route outside1 39.XX.XX.218 255.255.255.255 192.XX.XX.172   # The route for accessing the public IP address of the VPN gateway on Alibaba Cloud. The next hop is a public IP address. 
    route private 192.168.0.0 255.255.0.0 192.168.50.216        # The route that points to the data center.

  3. パブリックインターフェイスのIKEv1機能を有効にします。

    crypto ikev1 enable outside1
  4. IKEv1ポリシーを作成し、CiscoファイアウォールのIKEフェーズで検証方法と認証アルゴリズム、暗号化アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IKEフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIKEフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ikev1 policy 10   
     authentication pre-share   # Specify the pre-shared key as the verification method. 
     encryption aes             # Specify the encryption algorithm. 
     hash sha                   # Specify the authentication algorithm. 
     group 14                   # Specify the DH group. 
     lifetime 86400             # Specify the time-based SA lifetime.

  5. IPsec変換セットとプロファイルを作成し、CiscoファイアウォールのIPsecフェーズで暗号化アルゴリズム、認証アルゴリズム、DHグループ、およびSAの有効期間を指定します。 値はAlibaba Cloudの値と同じである必要があります。

    重要

    Alibaba CloudでIPsec-VPN接続を設定する場合、IPsecフェーズで暗号化アルゴリズム認証アルゴリズム、およびDHグループに指定できる値は1つだけです。 CiscoファイアウォールのIPsecフェーズでは、暗号化アルゴリズム、認証アルゴリズム、およびDHグループに1つの値のみを指定することを推奨します。 値はAlibaba Cloudの値と同じである必要があります。

    crypto ipsec ikev1 transform-set TRANSFORM esp-aes esp-sha-hmac  # Create an IPsec transform set and specify the encryption algorithm and authentication algorithm. 
    crypto ipsec profile ALIYUN-PROFILE                  
     set ikev1 transform-set TRANSFORM                               # Apply the transform set that is created. 
     set pfs group14                                                 # Specify the PFS and DH group. 
     set security-association lifetime seconds 86400                 # Specify the time-based SA lifetime. 
     set security-association lifetime kilobytes unlimited           # Disable the traffic-based SA lifetime. 
    
    crypto isakmp identity address                                   # Set the format of the fully qualified domain name (FQDN) to IP address.

  6. トンネルグループを作成し、トンネルの事前共有キーを指定します。これはAlibaba Cloudと同じである必要があります。

    tunnel-group 39.XX.XX.218 type ipsec-l2l                #  Specify the encapsulation mode l2l for the tunnel. 
    tunnel-group 39.XX.XX.218 ipsec-attributes             
     ikev1 pre-shared-key 123456****                        # Specify the peer pre-shared key for the tunnel, which is the pre-shared key on Alibaba Cloud. 
    !
  7. トンネルインターフェイスを作成します。

    interface Tunnel1                                  # Create an interface for the tunnel. 
     nameif ALIYUN1
     ip address 169.254.10.2 255.255.255.252           # Specify the IP address of the interface for the tunnel. 
     tunnel source interface outside1                  # Specify the IP address of the GigabitEthernet 0/0 interface as the source address of the tunnel. 
     tunnel destination 39.XX.XX.218                   # Specify the public IP address for the VPN gateway on Alibaba Cloud as the destination address of the tunnel. 
     tunnel mode ipsec ipv4
     tunnel protection ipsec profile ALIYUN-PROFILE # Apply the IPsec profile ALIYUN-PROFILE on the tunnel. 
     no shutdown                                       # Enable the interface for the tunnel. 
    !
  8. BGP動的ルーティングを設定します。

    router bgp 65000
     address-family ipv4 unicast
      neighbor 169.254.10.1 remote-as 65530       # Specify the BGP peer, which is the BGP IP address on Alibaba Cloud. 
      neighbor 169.254.10.1 ebgp-multihop 255
      neighbor 169.254.10.1 activate              # Activate the BGP peer. 
      network 192.168.0.0 mask 255.255.0.0 # Advertise the CIDR block of the data center. 
     exit-address-family
  9. データセンターで、クライアントとCiscoファイアウォール間のトラフィックのルートを設定します。

    その後、データセンターとAlibaba Cloud VPC間のネットワーク接続をテストできます。 詳細については、「シングルトンネルモードでVPCをデータセンターに接続する」の「ステップ6: ネットワーク接続のテスト」セクションをご参照ください。