1
1

More than 3 years have passed since last update.

OracleCloud IPsec VPNで接続してみた (VyOS)

Last updated at Posted at 2019-05-05

はじめに

Oracle Cloud には、Oracle Cloud の仮想ネットワーク(VCN) と オンプレミスネットワークを相互に接続する方法があります。大きく分けて、下の3個の方法があります。

  • Internet接続:Global IP を使用して接続
  • IPsec VPN接続:Internet を経由して、仮想的なプライベート接続
  • FastConnect接続:キャリアが提供するネットワーク(閉域網など)を使用して、プライベート接続。帯域やレイテンシーなど、性能が高いのが特徴

今回の記事は、手軽にプライベート接続を確認するために、IPsec VPN 接続を行う手順を記載します。
IPsec接続するための、VPN ルータは、VyOSを使用します。

接続概要

オンプレミス環境を持っていないため、OCIのVCNを疑似オンプレミス環境として扱います。
純粋なVCN環境と、疑似オンプレミスとして扱うVCN環境の、2環境をIPsec VPNで相互接続を行います。

001.gif

  • VCN : Frankfurt の VCN
    • CIDR:10.0.0.0/16
  • 疑似オンプレミス : Oracle Cloud の VCNを疑似オンプレミスとして使う
    • CIDR:10.100.0.0/16
    • VyOS をIPsec VPNのルータとして使用

手順

oci cli を主に使用して設定を進めます。変数格納や json を加工するための jq コマンドを多用していますのでご注意ください。

VCN側 事前準備

VCNを作成

oci network vcn create --cidr-block 10.0.0.0/16 --display-name vpnnw-vyos --dns-label vpnnwvyos --profile frankfurt

VCNのOCIR を変数に格納

set vcn_ocid (oci network vcn list --profile frankfurt | jq -r '.data | map(select(.["display-name"] == "vpnnw-vyos"))[].id')

Regional Private Subnet を2個、Regional Public Subnetを1個作成
Regional Public Subnet を作る理由は、手元のPCからVCN環境へ接続するためです。

oci network subnet create --cidr-block 10.0.0.0/24 --vcn-id $vcn_ocid --display-name private01 --dns-label private01 --prohibit-public-ip-on-vnic true --profile frankfurt
oci network subnet create --cidr-block 10.0.1.0/24 --vcn-id $vcn_ocid --display-name private02 --dns-label private02 --prohibit-public-ip-on-vnic true --profile frankfurt
oci network subnet create --cidr-block 10.0.2.0/24 --vcn-id $vcn_ocid --display-name public01 --dns-label public01 --prohibit-public-ip-on-vnic false --profile frankfurt

3個のsubnetのOCIDを変数に格納

set subnet_private01 (oci network subnet list --vcn-id $vcn_ocid --display-name private01 --profile frankfurt | jq -r ".data[0].id")
set subnet_private02 (oci network subnet list --vcn-id $vcn_ocid --display-name private02 --profile frankfurt | jq -r ".data[0].id")
set subnet_public01 (oci network subnet list --vcn-id $vcn_ocid --display-name public01 --profile frankfurt | jq -r ".data[0].id")

Ubuntu18.04のOCIDを変数に格納

set ubuntu1804_ocid (oci compute image list --operating-system "Canonical Ubuntu" --operating-system-version "18.04" --sort-by TIMECREATED --sort-order DESC --profile frankfurt | jq -r ".data[0].id")

Instance を作成

oci compute instance launch \
--availability-domain TGjA:EU-FRANKFURT-1-AD-1 \
--fault-domain FAULT-DOMAIN-1 \
--shape VM.Standard2.2 \
--display-name privins01 \
--hostname-label privins01 \
--image-id $ubuntu1804_ocid \
--subnet-id $subnet_private01 \
--assign-public-ip false \
--ssh-authorized-keys-file ~/.ssh/id_rsa.pub \
--profile frankfurt

oci compute instance launch \
--availability-domain TGjA:EU-FRANKFURT-1-AD-2 \
--fault-domain FAULT-DOMAIN-1 \
--shape VM.Standard2.2 \
--display-name privins02 \
--hostname-label privins02 \
--image-id $ubuntu1804_ocid \
--subnet-id $subnet_private02 \
--assign-public-ip false \
--ssh-authorized-keys-file ~/.ssh/id_rsa.pub \
--profile frankfurt

oci compute instance launch \
--availability-domain TGjA:EU-FRANKFURT-1-AD-3 \
--fault-domain FAULT-DOMAIN-1 \
--shape VM.Standard2.2 \
--display-name pubins01 \
--hostname-label pubins01 \
--image-id $ubuntu1804_ocid \
--subnet-id $subnet_public01 \
--assign-public-ip true \
--ssh-authorized-keys-file ~/.ssh/id_rsa.pub \
--profile frankfurt

Public Instance に接続するため、Internet Gateway・Route Tableを作成して、Public Subnet に設定します

oci network internet-gateway create --is-enabled true --vcn-id $vcn_ocid --display-name intgw01 --profile frankfurt
set ig_ocid (oci network internet-gateway list --vcn-id $vcn_ocid --display-name intgw01 --profile frankfurt | jq -r ".data[0].id")
oci network route-table create --vcn-id $vcn_ocid --display-name public-routetable --profile frankfurt \
  --route-rules "[{\"cidrBlock\":\"0.0.0.0/0\",\"networkEntityId\":\"$ig_ocid\"}]"
set routetable_ocid (oci network route-table list --vcn-id $vcn_ocid --display-name public-routetable --profile frankfurt | jq -r ".data[0].id")
oci network subnet update --subnet-id $subnet_public01 --route-table-id $routetable_ocid --profile frankfurt

疑似オンプレミス側 事前準備

VyOSをOCIで稼働させるために、こちらの記事を参考に Custom Image を作成します。

VCNを作成

oci network vcn create --cidr-block 10.100.0.0/16 --display-name onpremnw-vyos --dns-label onpremnwvyos --profile ashburn

VCNのOCIR を変数に格納

set onprem_vcn_ocid (oci network vcn list --profile ashburn | jq -r '.data | map(select(.["display-name"] == "onpremnw-vyos"))[].id')

regional public subnet を1個作成

oci network subnet create --cidr-block 10.100.0.0/24 --vcn-id $onprem_vcn_ocid --display-name onprem01 --dns-label onprem01 --prohibit-public-ip-on-vnic false --profile ashburn

subnetのOCIDを変数に格納

set subnet_onprem01 (oci network subnet list --vcn-id $onprem_vcn_ocid --display-name onprem01 --profile ashburn | jq -r ".data[0].id")

Ubuntu18.04 ImageのOCIDを変数に格納

set ubuntu1804_ocid (oci compute image list --operating-system "Canonical Ubuntu" --operating-system-version "18.04" --sort-by TIMECREATED --sort-order DESC --profile ashburn | jq -r ".data[0].id")

VyOS用 Image の OCID を変数に格納

set vyos_ocid (oci compute image list --profile ashburn --display-name "vyos-1.2.0" | jq -r ".data[0].id")

Instance

oci compute instance launch \
--availability-domain TGjA:US-ASHBURN-AD-2 \
--fault-domain FAULT-DOMAIN-1 \
--shape VM.Standard2.2 \
--display-name onpremins01 \
--hostname-label onpremins01 \
--image-id $ubuntu1804_ocid \
--subnet-id $subnet_onprem01 \
--assign-public-ip true \
--ssh-authorized-keys-file ~/.ssh/id_rsa.pub \
--profile ashburn

oci compute instance launch \
--availability-domain TGjA:US-ASHBURN-AD-2 \
--fault-domain FAULT-DOMAIN-1 \
--shape VM.Standard2.2 \
--display-name vyos \
--hostname-label vyos \
--image-id $vyos_ocid \
--subnet-id $subnet_onprem01 \
--assign-public-ip true \
--ssh-authorized-keys-file ~/.ssh/id_rsa.pub \
--profile ashburn

Instance に接続するため、Internet Gatewayを作成して、Default Route Table に、ルールを設定します

oci network internet-gateway create --is-enabled true --vcn-id $onprem_vcn_ocid --display-name intgw1 --profile ashburn
set onpewm_ig_ocid (oci network internet-gateway list --vcn-id $onprem_vcn_ocid --display-name intgw1 --profile ashburn | jq -r ".data[0].id")
set onpewm_routetable_ocid (oci network route-table list --vcn-id $onprem_vcn_ocid --display-name "Default Route Table for onpremnw-vyos" --profile ashburn | jq -r ".data[0].id")
oci network route-table update --rt-id $onpewm_routetable_ocid --route-rules "[{\"cidrBlock\":\"0.0.0.0/0\",\"networkEntityId\":\"$onpewm_ig_ocid\"}]" --profile ashburn

VyOSのVNIC設定変更。VNIC上で、Source/Destination Check を実施しない(スキップ)するように変更します。

set vyos_instance_ocid (oci compute instance list --display-name "vyos" --profile ashburn | jq -r ".data[0].id")
set vyos_vnic_ocid (oci compute instance list-vnics --instance-id $vyos_instance_ocid --profile ashburn | jq -r ".data[0].id")
oci network vnic update --vnic-id $vyos_vnic_ocid --skip-source-dest-check true --profile ashburn

こちらの記事を参考に、Deploy した VyOSインスタンスのIPアドレスを設定、SSHポートの設定変更などを行います。

Security List を変更して、以下の要件に対応します

  • VyOSサーバのSSHポート変更
  • ICMP (Ping)
  • IPsecのためにポート開放 (4500, 500, ESP) ESPプロトコル(protocol50)を許可するのを、忘れないように注意
set onprem_vcn_seclist_ocid (oci network security-list list --vcn-id $onprem_vcn_ocid --display-name "Default Security List for onpremnw-vyos" --profile ashburn | jq -r ".data[0].id")
oci network security-list update --security-list-id $onprem_vcn_seclist_ocid --profile ashburn --force \
  --ingress-security-rules '[
                              { 
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "6",
                                "tcpOptions": {
                                  "sourcePortRange": null,
                                  "destinationPortRange": {"max":22, "min":22}
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "1"
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "6",
                                "tcpOptions": {
                                  "sourcePortRange": null,
                                  "destinationPortRange": {"max":52016, "min":52016}
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "6",
                                "tcpOptions": {
                                  "sourcePortRange": null,
                                  "destinationPortRange": {"max":500, "min":500}
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "6",
                                "tcpOptions": {
                                  "sourcePortRange": null,
                                  "destinationPortRange": {"max":4500, "min":4500}
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "17",
                                "udpOptions": {
                                  "sourcePortRange": null,
                                  "destinationPortRange": {"max":500, "min":500}
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "17",
                                "udpOptions": {
                                  "sourcePortRange": null,
                                  "destinationPortRange": {"max":4500, "min":4500}
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "50"
                               }
                            ]'

VCN側 IPsec設定

DRG作成

DRG作成

oci network drg create --display-name drg01 --profile frankfurt

DRGのIDを変数に格納

set drg_ocid (oci network drg list --profile frankfurt | jq -r '.data | map(select(.["display-name"] == "drg01"))[].id')

VCNにDRGをアタッチ

oci network drg-attachment create --vcn-id $vcn_ocid --drg-id $drg_ocid --profile frankfurt

Route Tablesの編集

既存Subnetに紐づいている Default の Route Tables を編集して、Static Route を設定します。オンプレミスへの通信は、DRGを経由する設定を付与します

  • Target Type : DRG
  • Destination CIDR Block : 10.100.0.0/16 (オンプレミスのネットワークセグメント)
  • Target DRG : drg01
set routetable_ocid (oci network route-table list --vcn-id $vcn_ocid --display-name "Default Route Table for vpnnw-vyos" --profile frankfurt | jq -r ".data[0].id")
oci network route-table update --profile frankfurt --rt-id $routetable_ocid --route-rules "[{\"cidrBlock\":\"10.100.0.0/16\",\"networkEntityId\":\"$drg_ocid\"}]"

コンソール上で表示結果

002.gif

Security List の編集

  • source port 500, 4500 を TCP UDP 共に設定
set vcn_seclist_ocid (oci network security-list list --vcn-id $vcn_ocid --display-name "Default Security List for vpnnw-vyos" --profile frankfurt | jq -r ".data[0].id")
oci network security-list update --security-list-id $vcn_seclist_ocid --profile frankfurt --force \
  --ingress-security-rules '[
                              { 
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "6",
                                "tcpOptions": {
                                  "sourcePortRange": null,
                                  "destinationPortRange": {"max":22, "min":22}
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "1"
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "6",
                                "tcpOptions": {
                                  "sourcePortRange": {"max":500, "min":500},
                                  "destinationPortRange": null
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "6",
                                "tcpOptions": {
                                  "sourcePortRange": {"max":4500, "min":4500},
                                  "destinationPortRange": null
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "17",
                                "udpOptions": {
                                  "sourcePortRange": {"max":500, "min":500},
                                  "destinationPortRange": null
                                }
                              },
                              {
                                "isStateless":false,
                                "source":  "0.0.0.0/0", 
                                "protocol": "17",
                                "udpOptions": {
                                  "sourcePortRange": {"max":4500, "min":4500},
                                  "destinationPortRange": null
                                }
                              }
                            ]'

コンソール上での結果表示

003.gif

CPE作成

CPE(Customer-Premises Equipment) を作成します。CPEはオンプレミスなどに存在している IPsec VPN のルータの Global IP を指定して、OCI上に作成を行います。

oci network cpe create --ip-address 129.213.37.197 --display-name omprem-vyos --profile frankfurt

CPE の OCID を変数に格納します

set cpe_ocid (oci network cpe list --profile frankfurt | jq -r '.data | map(select(.["display-name"] == "omprem-vyos"))[].id') 

IPSec Connections作成

VCNとオンプレミス環境を接続するための、IPSec Connection を作成します。IPSec Connection を1個作成することで、コネクションを設定するためのVCN側のGlibal IP が2個生成されます。
冗長構成を考慮すると、Global IP 2個ともコネクションを設定するのが推奨です。
なお、オンプレミス側でも、IPSec のためのルータは複数用意することが推奨ですが、今回は簡単にするため1個のIPSec ルータで設定を進めています。

create する時のパラメータ static-routes は、オンプレミス環境のネットワークを指定します。
createした後、Availableになるまで、自分の環境では5分ほど待機する必要がありました

oci network ip-sec-connection create --cpe-id $cpe_ocid --drg-id $drg_ocid --static-routes '["10.100.0.0/16"]' --display-name ipsec-con-vyos --profile frankfurt

ID を変数に格納

set ipsec_con_ocid (oci network ip-sec-connection list --cpe-id $cpe_ocid --drg-id $drg_ocid --profile frankfurt | jq -r ".data[0].id")

IPSec connection に設定された Global IP2個と、コネクションを張るためのパスワード shared-secret の値を確認します。以下の例では実際の値を、 secret1, secret2 に変更しています。

> oci network ip-sec-connection get-config --profile frankfurt --ipsc-id $ipsec_con_ocid
{
  "data": {
    "compartment-id": "ocid1.compartment.oc1..aaaaaaaasaxgjviqpyubmkpj3pnh6khw4wtsc736bquokfqgduq6h7wubsta",
    "id": "ocid1.ipsecconnection.oc1.eu-frankfurt-1.aaaaaaaauj7sjz4qqcftpg3kvxheufnaiq6bw2upmw3if2drecwp662eykkq",
    "time-created": "2019-05-05T11:50:55.557000+00:00",
    "tunnels": [
      {
        "ip-address": "130.61.6.62",
        "shared-secret": "secret1",
        "time-created": "2019-05-05T11:50:55.618000+00:00"
      },
      {
        "ip-address": "130.61.7.62",
        "shared-secret": "secret2",
        "time-created": "2019-05-05T11:50:55.614000+00:00"
      }
    ]
  }
}

疑似オンプレミス側 VyOS 設定

Route Table を更新 VyOSに向ける

疑似オンプレミス環境は、OCIを使っているため、Route Table を更新する必要があります。
疑似オンプレミスから、OCIのVCNへ通信するためのStatic Route を設定し、Libreswan(10.100.0.5)経由でのルーティングを有効にします。
実際のオンプレミス環境の場合は、ルータなどでルーティング情報を更新する必要があります。

004.gif

memo : CLI で設定

GUI の調子が悪いときは、OCI CLI でも設定可能です

oci network route-table update \
--rt-id ocid1.routetable.oc1.ap-tokyo-1.aaaaaaaaffevijrdvm5jvoiqrdhicrs2vkys7pqgp2vearx2kzcsg4kcr3ka \
--route-rules '
[
  {
    "cidr-block": null,
    "description": null,
    "destination": "0.0.0.0/0",
    "destination-type": "CIDR_BLOCK",
    "network-entity-id": "ocid1.privateip.oc1.ap-tokyo-1.abxhiljre5jaj56r7brnjvpr74if6plyq244t57op2k4slkbpbybyupkjbna"
  }
]
'

VyOS設定

VyOSでIPsec VPN のための設定を行います。configure mode に入ります

$ configure
#

VyOS上でVPN用のVTI(Virtual Tunnel Interface) を2個作成します。

set interface vti vti0 description "OCI IPSec tunnel 1"
set interface vti vti1 description "OCI IPSec tunnel 2"
set vpn ipsec ipsec-interfaces interface eth0

IKE(Internet Key Exchage) の設定を行います。IKEは鍵交換を行うためのプロトコルです。IKEは、ISAKMP/Oakleyというプロトコルをもとにして作られています。

set vpn ipsec ike-group oracle proposal 1
set vpn ipsec ike-group oracle proposal 1 encryption aes256
set vpn ipsec ike-group oracle proposal 1 hash sha256
set vpn ipsec ike-group oracle lifetime 28800
set vpn ipsec ike-group oracle proposal 1 dh-group 5

ESP(Encapsulated Security Payload) の設定を行います。ESPは、パケットの改ざんが行われていないか認証を行うプロトコルです。

set vpn ipsec esp-group oracle proposal 1
set vpn ipsec esp-group oracle proposal 1 encryption aes256
set vpn ipsec esp-group oracle proposal 1 hash sha1
set vpn ipsec esp-group oracle lifetime 3600
set vpn ipsec esp-group oracle pfs enable

OCIのDRGとVyOS間で、IPsec のピアを設定します。
peerに入力する Global IP は、OCIのIPsec Connection配下にある、2個の Global IP をそれぞれ入力します。
pre-shared-secretの値は、IPsec Connection配下にあるTunnelで表示される「Shared Secret」の値を入力します。

# peer 1
set vpn ipsec site-to-site peer 130.61.6.62
set vpn ipsec site-to-site peer 130.61.6.62 authentication mode pre-shared-secret
set vpn ipsec site-to-site peer 130.61.6.62 authentication pre-shared-secret secret1
set vpn ipsec site-to-site peer 130.61.6.62 authentication id 129.213.37.197
set vpn ipsec site-to-site peer 130.61.6.62 default-esp-group oracle
set vpn ipsec site-to-site peer 130.61.6.62 ike-group oracle
set vpn ipsec site-to-site peer 130.61.6.62 local-address 10.100.0.3
set vpn ipsec site-to-site peer 130.61.6.62 vti bind vti0

# peer 2
set vpn ipsec site-to-site peer 130.61.7.62
set vpn ipsec site-to-site peer 130.61.7.62 authentication mode pre-shared-secret
set vpn ipsec site-to-site peer 130.61.7.62 authentication pre-shared-secret secret2
set vpn ipsec site-to-site peer 130.61.7.62 authentication id 129.213.37.197
set vpn ipsec site-to-site peer 130.61.7.62 default-esp-group oracle
set vpn ipsec site-to-site peer 130.61.7.62 ike-group oracle
set vpn ipsec site-to-site peer 130.61.7.62 local-address 10.100.0.3
set vpn ipsec site-to-site peer 130.61.7.62 vti bind vti1

疑似オンプレミス環境 から VCNへのStaticRouteを設定します

set protocols static interface-route 10.0.0.0/16 next-hop-interface vti0
set protocols static interface-route 10.0.0.0/16 next-hop-interface vti1

上記コマンドでStaticRouteが反映されない場合は、Linux Kernel から直接実行すると一時的な設定が出来ます。OS再起動するとStaticRouteの設定が消えるため注意

sudo ip route add 10.0.0.0/16 nexthop dev vti0 nexthop dev vti1

設定を保存します

commit
save

通信確認

VyOSからVCN

ping

vyos@vyos:~$ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=99.2 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=63 time=99.3 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=63 time=99.2 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=63 time=99.3 ms
^C
--- 10.0.0.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 99.254/99.310/99.370/0.227 ms
vyos@vyos:~$
vyos@vyos:~$ ping 10.0.1.2
PING 10.0.1.2 (10.0.1.2) 56(84) bytes of data.
64 bytes from 10.0.1.2: icmp_seq=1 ttl=63 time=96.1 ms
64 bytes from 10.0.1.2: icmp_seq=2 ttl=63 time=96.1 ms
64 bytes from 10.0.1.2: icmp_seq=3 ttl=63 time=96.0 ms
64 bytes from 10.0.1.2: icmp_seq=4 ttl=63 time=96.1 ms
^C
--- 10.0.1.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 96.089/96.134/96.164/0.221 ms

ssh

vyos@vyos:~$ ssh ubuntu@10.0.0.2
The authenticity of host '10.0.0.2 (10.0.0.2)' can't be established.
ECDSA key fingerprint is 82:13:5a:0b:81:fb:6e:62:92:7f:25:6f:1e:85:cc:64.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.2' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1010-oracle x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Sun May  5 16:28:07 UTC 2019

  System load:  0.04              Processes:           124
  Usage of /:   2.8% of 44.97GB   Users logged in:     1
  Memory usage: 1%                IP address for ens3: 10.0.0.2
  Swap usage:   0%


0 packages can be updated.
0 updates are security updates.

Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings


Last login: Sun May  5 13:56:36 2019 from 10.0.2.2
ubuntu@privins01:~$

疑似オンプレミスインスタンスからVCN

ping

ubuntu@onpremins01:~$ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=62 time=98.3 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=62 time=98.1 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=62 time=98.2 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=62 time=98.1 ms
^C
--- 10.0.0.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 98.138/98.213/98.316/0.230 ms
ubuntu@onpremins01:~$
ubuntu@onpremins01:~$ ping 10.0.1.2
PING 10.0.1.2 (10.0.1.2) 56(84) bytes of data.
64 bytes from 10.0.1.2: icmp_seq=1 ttl=62 time=95.1 ms
64 bytes from 10.0.1.2: icmp_seq=2 ttl=62 time=95.0 ms
64 bytes from 10.0.1.2: icmp_seq=3 ttl=62 time=95.0 ms
64 bytes from 10.0.1.2: icmp_seq=4 ttl=62 time=95.0 ms
^C
--- 10.0.1.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 95.010/95.066/95.128/0.379 ms

ssh

ubuntu@onpremins01:~$ ssh ubuntu@10.0.0.2
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1010-oracle x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Sun May  5 16:30:22 UTC 2019

  System load:  0.08              Processes:           125
  Usage of /:   2.8% of 44.97GB   Users logged in:     1
  Memory usage: 1%                IP address for ens3: 10.0.0.2
  Swap usage:   0%


0 packages can be updated.
0 updates are security updates.

Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings


Last login: Sun May  5 16:30:19 2019 from 10.100.0.2

参考URL

CPE側での設定
https://docs.cloud.oracle.com/iaas/Content/Network/Reference/genericCPE.htm

VyOS と OCI DRG 間で IPsec VPN を接続
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=379507846602263&parent=EXTERNAL_SEARCH&sourceId=HOWTO&id=2488635.1&_afrWindowMode=0&_adf.ctrl-state=10n8ilte2k_4

VyOS クラスタ

1
1
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
1
1