0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Palo Altoを使用したOCI IPSec VPN接続例

Last updated at Posted at 2023-02-05

概要

Palo Altoを使用してOCIにIPSec VPNで接続する設定例です。

構成

image.png

設定例

ここでは作成済みの設定となります。
image.png
image.png
image.png
image.png
image.png
image.png
image.png

  • Palo Alto
    AWS MarketplaceからVM-Series Next-Generation Firewall Bundle 1を利用しました。
    Software Versionは11.0.0です。
    作成については以下のサイトをご参照ください。
    CPE構成 Palo Alto
    https://docs.oracle.com/ja-jp/iaas/Content/Network/Reference/paloaltoCPE.htm
    ここでは作成済みの設定となります。
    NETWORK>Interface
    EthernetはAWS VPCの状況に応じて以下のように設定しました
    ethernet1/1: Private 10.2.3.0/24
    ethernet1/2: Public 10.2.4.0/24
    Default route metricはethernet1/2が優先されるよう調整します
    (ethernet1/1は20, ethernet1/2は10)
    image.png
    NETWORK>Zones
    Staticrouteを以下のように設定します
    image.png
    NETWORK>Virtual Routers
    image.png
    StaticrouteはVPNがDownしてもRouteが消えないためPath Monitoringを設定してVPN Down時は当該Static Routeを消すように設定します。
    各種パラメータは状況に合わせて調整してください
    image.png
    image.png
    NETWORK>IKE Crypto
    新規で以下のとおりISAKMPポリシーの設定を行います
    image.png
    NETWORK>IKE Gateway
    作成したISAKMPポリシーを使用してIKE Gatewayを作成します
    Tunnel1
    image.png
    Tunnel2
    image.png
    NETWORK>IPSec Crypto
    IPSecプロファイルを作成します
    【注意】
    IPSecパラメータの一部(認証アルゴリズム SHA-1)はサポート対象外のため変更が必要です
    変更前
    authentication: sha1
    変更後
    authentication: sha256

サポートされているIPSecパラメータ
paloalto Define IPSec Crypto Profiles

image.png

NETWORK>Interface
Tunnelは以下のように設定しました
image.png

NETWORK>IPSec Tunnels
Tunnel1
image.png
Tunnel2
image.png

POLICIES>Security
検証のためのポリシー設定なので必ず利用状況に合わせて見直してください
image.png

Routing抜粋
10.0.0.0/24はメトリックで調整してtunnel.1が優先ルートとなっています。
ただしOCI側はtunnel1/2に対して優先ルートは設定できないので非対称ルーティングがNGの環境の場合はBGP利用の検討が必要です。
image.png
image.png

admin@PA-VM> show routing route

flags: A:active, ?:loose, C:connect, H:host, S:static, ~:internal, R:rip, O:ospf, B:bgp,
       Oi:ospf intra-area, Oo:ospf inter-area, O1:ospf ext-type-1, O2:ospf ext-type-2, E:ecmp, M:multicast


VIRTUAL ROUTER: default (id 1)
  ==========
destination                                 nexthop                                 metric flags      age   interface          next-AS
10.0.0.0/24                                 192.168.0.10                            10     A S              tunnel.1
10.0.0.0/24                                 192.168.0.14                            20       S              tunnel.2
192.168.0.8/30                              192.168.0.9                             0      A C              tunnel.1
192.168.0.9/32                              0.0.0.0                                 0      A H
192.168.0.12/30                             192.168.0.13                            0      A C              tunnel.2
192.168.0.13/32                             0.0.0.0                                 0      A H

IPSec状況抜粋

admin@PA-VM> show vpn ike-sa

IKEv1 phase-1 SAs
GwID/client IP  Peer-Address   Gateway Name Role Mode Algorithm             
--------------  ------------   ------------ ---- ---- ---------             
2               [OCI_Global_IP2]  OCI-IKEGW2   Resp Main PSK/ DH5/A256/SHA384  
3               [OCI_Global_IP1]  OCI-IKEGW1   Resp Main PSK/ DH5/A256/SHA384 

Show IKEv1 IKE SA: Total 2 gateways found. 2 ike sa found.


IKEv1 phase-2 SAs
Gateway Name TnID     Tunnel        GwID/IP     Role Algorithm          SPI(in)  SPI(out) MsgID    ST Xt
------------ ----     ------        -------    ---- ---------          -------  -------- -----    -- --
OCI-IKEGW2   2        Palovpn-tun2  2           Resp ESP/ DH5/tunl/SHA1 A003B183 4E5E0F08 D1E6849C 9  1
OCI-IKEGW1   1        Palovpn-tun1  3           Resp ESP/ DH5/tunl/SHA1 806B7891 F04F9476 9D521EA3 9  1

Show IKEv1 phase2 SA: Total 2 gateways found. 3 ike sa found.


There is no IKEv2 SA found.

admin@PA-VM>
admin@PA-VM> show vpn ipsec-sa

GwID/client IP  TnID   Peer-Address           Tunnel(Gateway)                                                                                                                  Algorithm          SPI(in)  SPI(out) life(Sec/KB)             remain-time(Sec)
--------------  ----   ------------           ---------------                                                                                                                  ---------          -------  -------- ------------             ----------------
3               1      [OCI_Global_IP1]          Palovpn-tun1(OCI-IKEGW1)                                                                                                         ESP/A256/SHA1      806B7891 F04F9476 3600/Unlimited           1590
2               2      [OCI_Global_IP2]          Palovpn-tun2(OCI-IKEGW2)                                                                                                         ESP/A256/SHA1      A003B183 4E5E0F08 3600/Unlimited           1676

Show IPSec SA: Total 2 tunnels found. 2 ipsec sa found.


admin@PA-VM>
  • Pingテスト
    AWSサーバーからOCIサーバーへのping結果
Server.
[ec2-user@ip-10-2-3-251 ~]$ ping 10.0.0.105
PING 10.0.0.105 (10.0.0.105) 56(84) bytes of data.
64 bytes from 10.0.0.105: icmp_seq=1 ttl=60 time=5.06 ms
64 bytes from 10.0.0.105: icmp_seq=2 ttl=60 time=5.05 ms
64 bytes from 10.0.0.105: icmp_seq=3 ttl=60 time=4.95 ms
64 bytes from 10.0.0.105: icmp_seq=4 ttl=60 time=4.96 ms
^C
--- 10.0.0.105 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 4.950/5.009/5.066/0.088 ms

OCIサーバーからAWSサーバーへのping結果

Server.
[opc@t-vm10-0-0-105 ~]$ ping 10.2.3.251
PING 10.2.3.251 (10.2.3.251) 56(84) bytes of data.
64 bytes from 10.2.3.251: icmp_seq=1 ttl=252 time=4.80 ms
64 bytes from 10.2.3.251: icmp_seq=2 ttl=252 time=5.00 ms
64 bytes from 10.2.3.251: icmp_seq=3 ttl=252 time=5.03 ms
64 bytes from 10.2.3.251: icmp_seq=4 ttl=252 time=5.02 ms
^C
--- 10.2.3.251 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 4.797/4.962/5.030/0.108 ms

IKE V2(ルートベース)

IKE V2の場合はPalo AltoにてProxy ID設定が必要です。
ルートベースでIKE V2を行う場合はProxy IDをローカル0.0.0.0/0, リモート0.0.0.0/0にすることによって実現可能とのことです

サポートされている暗号化ドメインまたはプロキシID
https://docs.oracle.com/ja-jp/iaas/Content/Network/Tasks/ipsecencryptiondomains.htm#Supported_Encryption_Domain_or_Proxy_ID

Proxy ID(セレクタ)については各ベンダ情報を確認いただいて障害テストを含め十分な検証を行ってください。
以下の例ではIKEv1で作成したVPN設定をIKEv2に変更した結果です

OCI側はOCIメニューからネットワーキング>>顧客接続性>>サイト間VPNで対象VPNのTunnel設定を編集しIKEバージョンをv1からv2に変更します。
Palo Alto側は以下のとおりです
NETWORK>IKE Gateway
作成したIKE GatewayのバージョンをIKEv2に変更します
image.png

AdvancedOptionも設定します。
image.png

NETWORK>Network Profiles>Monitor
IPSec用のモニターを作成します
image.png

NETWORK>IPSec Tunnels
作成したTunnel設定にProxy IDを登録します。ルートベースはLocalに0.0.0.0/0 Remoteに0.0.0.0/0を設定します。
また作成したIPSecモニターをここで指定します。
Tunnel1
image.png

Tunnel2
image.png

  • Pingテスト
    AWSサーバーからOCIサーバーへのping結果
Server.
[ec2-user@ip-10-2-3-251 ~]$ ping 10.0.0.105
PING 10.0.0.105 (10.0.0.105) 56(84) bytes of data.
64 bytes from 10.0.0.105: icmp_seq=1 ttl=60 time=5.02 ms
64 bytes from 10.0.0.105: icmp_seq=2 ttl=60 time=5.05 ms
64 bytes from 10.0.0.105: icmp_seq=3 ttl=60 time=5.26 ms
64 bytes from 10.0.0.105: icmp_seq=4 ttl=60 time=5.08 ms
^C
--- 10.0.0.105 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 5.025/5.106/5.264/0.106 ms

OCIサーバーからAWSサーバーへのping結果

Server.
[opc@t-vm10-0-0-105 ~]$ ping 10.2.3.251
PING 10.2.3.251 (10.2.3.251) 56(84) bytes of data.
64 bytes from 10.2.3.251: icmp_seq=1 ttl=252 time=4.79 ms
64 bytes from 10.2.3.251: icmp_seq=2 ttl=252 time=5.38 ms
64 bytes from 10.2.3.251: icmp_seq=3 ttl=252 time=5.65 ms
64 bytes from 10.2.3.251: icmp_seq=4 ttl=252 time=4.99 ms
^C
--- 10.2.3.251 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 4.794/5.202/5.650/0.340 ms
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?