Oracle Cloud InfrastructureとVPN(IPsec)接続するルーターの設定 : コマンド設定

管理番号:YMHRT-15979

本設定例では、Oracle Cloud InfrastructureとIPsec接続する機能を使用しています。

本機能の対応機種は、RTX5000RTX3500RTX1300RTX1220RTX1210RTX830NVR700Wです。

Oracle Cloud InfrastructureとVPN(IPsec)接続するルーターの設定 : コマンド設定

Oracle Cloud Infrastructure(以降、OCI)とVPN接続するための、ヤマハルーター(以降、ルーター)の設定手順を紹介します。

光回線に接続するためには、別途ONUが必要です。
NVR700Wは、本体のONUポートに小型ONUを装着することで、光回線に接続できます。

ルーターの設定を行う前に、以下の確認をお願いします。

  • 先に、ルーターは固定のグローバルIPアドレスを取得する必要があります。
  • その後、OCIの仮想ネットワークの設定を行ってください。OCIの仮想ネットワークの設定手順はこちらです。

本設定例について

  • OCIの仮想ネットワークとの接続を保証するものではありません。
  • 2019年2月11日現在の仕様に基づいて記載しています。確認しているファームウェアは下記のとおりです。今後、サービス内容の変更や、仕様変更などによって接続できなくなる可能性があります。
    RTX5000 Rev.14.00.26
    RTX3500 Rev.14.00.26
    RTX1210 Rev.14.01.28
    RTX830 Rev.15.02.03
    NVR700W Rev.15.00.14
  • OCIに関する情報および設定方法については、日本オラクル株式会社にお問い合わせください。

設定手順

次の手順で、ルーターを設定してください。

  1. 「ルーターの設定(1)」に記載のConfigを参考に、ルーターでプロバイダーの設定をします。
  2.  Oracle Cloud Infrastructureの仮想ネットワーク(IPsec)を設定します。
  3. 「ルーターの設定(2)」に記載のConfigを参考に、ルーターでIPsecの設定をします。

ルーターの設定(1)

※ネットワーク機器を安全にお使いいただくために、定期的な管理パスワードの変更を推奨します。

ゲートウェイの設定 ip route default gateway pp 1 filter 500000 gateway pp 1
LANインターフェースの設定
(LAN1ポートを使用)
ip lan1 address 192.168.100.1/24
WANインターフェースの設定
(LAN2ポートを使用)
pp select 1
pp always-on on
pppoe use lan2
pppoe auto disconnect off
pp auth accept pap chap
pp auth myname (ISPへ接続するID) (ISPへ接続するパスワード)
ppp lcp mru on 1454
ppp ipcp msext on
ppp ccp type none
ip pp address (ルーターのグローバルIPアドレス)
ip pp secure filter in 200003 200020 200021 200022 200023 200024 200025 200030 200032 200080 200081
ip pp secure filter out 200013 200020 200021 200022 200023 200024 200025 200026 200027 200099 dynamic 200080 200081 200082 200083 200084 200085 200098 200099
ip pp nat descriptor 1000
pp enable 1
フィルターの設定 ip filter 200000 reject 10.0.0.0/8 * * * *
ip filter 200001 reject 172.16.0.0/12 * * * *
ip filter 200002 reject 192.168.0.0/16 * * * *
ip filter 200003 reject 192.168.100.0/24 * * * *
ip filter 200010 reject * 10.0.0.0/8 * * *
ip filter 200011 reject * 172.16.0.0/12 * * *
ip filter 200012 reject * 192.168.0.0/16 * * *
ip filter 200013 reject * 192.168.100.0/24 * * *
ip filter 200020 reject * * udp,tcp 135 *
ip filter 200021 reject * * udp,tcp * 135
ip filter 200022 reject * * udp,tcp netbios_ns-netbios_ssn *
ip filter 200023 reject * * udp,tcp * netbios_ns-netbios_ssn
ip filter 200024 reject * * udp,tcp 445 *
ip filter 200025 reject * * udp,tcp * 445
ip filter 200026 restrict * * tcpfin * www,21,nntp
ip filter 200027 restrict * * tcprst * www,21,nntp
ip filter 200030 pass * 192.168.100.0/24 icmp * *
ip filter 200031 pass * 192.168.100.0/24 established * *
ip filter 200032 pass * 192.168.100.0/24 tcp * ident
ip filter 200033 pass * 192.168.100.0/24 tcp ftpdata *
ip filter 200034 pass * 192.168.100.0/24 tcp,udp * domain
ip filter 200035 pass * 192.168.100.0/24 udp domain *
ip filter 200036 pass * 192.168.100.0/24 udp * ntp
ip filter 200037 pass * 192.168.100.0/24 udp ntp *
ip filter 200080 pass * 192.168.100.1 udp * 500 # 注釈1
ip filter 200081 pass * 192.168.100.1 esp * * # 注釈1
ip filter 200098 reject-nolog * * established
ip filter 200099 pass * * * * *
ip filter 500000 restrict * * * * *
ip filter dynamic 200080 * * ftp
ip filter dynamic 200081 * * domain
ip filter dynamic 200082 * * www
ip filter dynamic 200083 * * smtp
ip filter dynamic 200084 * * pop3
ip filter dynamic 200085 * * submission
ip filter dynamic 200098 * * tcp
ip filter dynamic 200099 * * udp
NATの設定 nat descriptor type 1000 masquerade
nat descriptor address outer 1000 (ルーターのグローバルIPアドレス)
nat descriptor masquerade static 1000 1 192.168.100.1 udp 500 # 注釈1
nat descriptor masquerade static 1000 2 192.168.100.1 esp # 注釈1
DNSの設定 dns server (ISPから指定されたDNSサーバーのIPアドレス)
dns private address spoof on
DHCPの設定 dhcp service server
dhcp server rfc2131 compliant except remain-silent
dhcp scope 1 192.168.100.2-192.168.100.191/24

ルーターの設定(2)

ゲートウェイの設定 ip route (VCNのLAN側ネットワークアドレス) gateway tunnel 1 hide gateway tunnel 2 hide
VPN(IPsec)の設定1
# 注釈2
tunnel select 1
description tunnel OCI-VPN1
ipsec tunnel 1
ipsec sa policy 1 1 esp aes256-cbc sha-hmac
ipsec ike duration ipsec-sa 1 3600
ipsec ike duration isakmp-sa 1 28800
ipsec ike encryption 1 aes256-cbc
ipsec ike group 1 modp1536
ipsec ike hash 1 sha256
ipsec ike keepalive log 1 off
ipsec ike keepalive use 1 on dpd 5 4
ipsec ike local address 1 (ルーターのグローバルIPアドレス)
ipsec ike local id 1 0.0.0.0/0
ipsec ike nat-traversal 1 on
ipsec ike pfs 1 on
ipsec ike pre-shared-key 1 text (DRGの1つ目の事前共有鍵)
ipsec ike remote address 1 (DRGの1つ目のグローバルIPアドレス)
ipsec ike remote id 1 0.0.0.0/0
ip tunnel tcp mss limit auto
tunnel enable 1
VPN(IPsec)の設定2
# 注釈2
tunnel select 2
description tunnel OCI-VPN2
ipsec tunnel 2
ipsec sa policy 2 2 esp aes256-cbc sha-hmac
ipsec ike duration ipsec-sa 2 3600
ipsec ike duration isakmp-sa 2 28800
ipsec ike encryption 2 aes256-cbc
ipsec ike group 2 modp1536
ipsec ike hash 2 sha256
ipsec ike keepalive log 2 off
ipsec ike keepalive use 2 on dpd 5 4
ipsec ike local address 2 (ルーターのグローバルIPアドレス)
ipsec ike local id 2 0.0.0.0/0
ipsec ike nat-traversal 2 on
ipsec ike pfs 2 on
ipsec ike pre-shared-key 2 text (DRGの2つ目の事前共有鍵)
ipsec ike remote address 2 (DRGの2つ目のグローバルIPアドレス)
ipsec ike remote id 2 0.0.0.0/0
ip tunnel tcp mss limit auto
tunnel enable 2
VPN(IPsec)の設定
(共通項目)
ipsec auto refresh on

[注釈の説明]

注釈1:
VPN(IPsec)に関係するパケットを通過させる設定です。

注釈2:
本設定例では、VPNの冗長化も考慮して、OCIとヤマハルーターとを2本のトンネルで接続しております。
両トンネルともアクティブで、OCI側からRTX側に流れるパケットはOCI側で負荷分散されます。

【ご注意】
本設定例は、設定の参考例を示したもので、動作を保証するものではございません。
ご利用いただく際には、十分に評価・検証を実施してください。

メール

ご相談・お問い合わせ