LoginSignup
0
0

YAHAMA RTX830を使用したOCI IPSec VPN接続例(IKEv2)

Posted at

概要

YAHAMA RTX830を使用してOCIにIPSec VPNで接続する設定例を以前に投稿しました。
YAHAMA RTX830を使用したOCI IPSec VPN接続例
この記事はIKEv1で設定しましたが今回はIKEv2を使用しています。

何がいいの?

公式ガイドではIKEv1を使った設定例が紹介されておりますがIKEv2を使った設定例の情報はありません。将来IKEv1サポート終了した場合においてもIKEv2に設定することにより資産の有効活用が可能です。

構成

設定例

ここでは作成済みの設定となります。
OCIコンソール ナビゲーションメニューからネットワーキング>>サイト間VPNから対象のVPNを選択

  • RTX830
    ファームウェアバージョンはRev.15.02.30です。
    AccesslistやVRRPは環境に応じて設定が必要です。

Config

login password *
administrator password encrypted *
login user admin *
user attribute connection=serial,telnet,remote,ssh,sftp,http gui-page=dashboard
,lan-map,config login-timer=300
user attribute admin connection=serial,telnet,remote,ssh,sftp,http gui-page=das
hboard,lan-map,config login-timer=2678400
console character en.ascii
login timer 3600
ip route default gatewayLAN GWip lan1 address 192.168.100.1/24
ip lan2 addressLAN IPtunnel select 1
 description tunnel OCI-VPN1
 ipsec tunnel 1
  ipsec sa policy 1 1 esp aes256-cbc sha256-hmac
  ipsec ike version 1 2
  ipsec ike duration child-sa 1 3600
  ipsec ike duration ike-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 rfc4306 5 4
  ipsec ike local address 1LAN IPipsec ike local name 1LAN IPipv4-addr
  ipsec ike nat-traversal 1 on
  ipsec ike pfs 1 on
  ipsec ike proposal-limitation 1 on
  ipsec ike pre-shared-key 1 textPreSharedKeyipsec ike remote address 1OCI_Global_IP1ipsec ike remote name 1OCI_Global_IP1ipv4-addr
  ipsec ike negotiation receive 1 off
 ip tunnel address 192.168.0.9/30
 ip tunnel remote address 192.168.0.10
 ip tunnel mtu 1340
 ip tunnel tcp mss limit 1300
 tunnel enable 1
tunnel select 2
 description tunnel OCI-VPN2
 ipsec tunnel 2
  ipsec sa policy 2 2 esp aes256-cbc sha256-hmac
  ipsec ike version 2 2
  ipsec ike duration child-sa 2 3600
  ipsec ike duration ike-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 rfc4306 5 4
  ipsec ike local address 2LAN IPipsec ike local name 2LAN IPipv4-addr
  ipsec ike nat-traversal 2 on
  ipsec ike pfs 2 on
  ipsec ike proposal-limitation 2 on
  ipsec ike pre-shared-key 2 textPreSharedKeyipsec ike remote address 2OCI_Global_IP1ipsec ike remote name 2OCI_Global_IP1ipv4-addr
  ipsec ike negotiation receive 2 off
 ip tunnel address 192.168.0.13/30
 ip tunnel remote address 192.168.0.14
 ip tunnel mtu 1340
 ip tunnel tcp mss limit 1300
 tunnel enable 2
bgp use on
bgp autonomous-system 64512
bgp log neighbor
bgp neighbor 1 31898 192.168.0.10 hold-time=180 local-address=192.168.0.9 ignore-capability=on
bgp neighbor 2 31898 192.168.0.14 hold-time=180 local-address=192.168.0.13 ignore-capability=on
bgp import filter 1 include 192.168.100.0/24
bgp import 31898 static filter 1
ipsec auto refresh on
syslog notice on
syslog debug off
telnetd service off
sshd service on
sshd host key generate *
sftpd host any
statistics traffic on

IKEv1からIKEv2に変更した場合の考慮事項です

IKEバージョンを2に指定します。

ipsec ike version 1 2

Phase1のライフタイムは28800秒、Phase2のライフタイムは3600秒を設定します。

ipsec ike duration child-sa 1 3600
ipsec ike duration ike-sa 1 28800

キープアライブはRFC4306(IKEv2 標準)を設定します。

ipsec ike keepalive use 1 on rfc4306 5 4

自分側のセキュリティ・ゲートウェイの名前を設定します。

ipsec ike local name 1 【LAN IP】 ipv4-addr

相手側のセキュリティ・ゲートウェイの名前を設定します。

ipsec ike remote name 1 【OCI_Global_IP1】 ipv4-addr

以下はipsec ike remote nameからIPアドレスが特定できれば不要とのことですが一旦設定しました。

ipsec ike remote address 1 【OCI_Global_IP1】

提案するアルゴリズムをipsec sa policyで設定したアルゴリズムに限定します。
このコマンドが設定されていない場合サポートするすべてのアルゴリズムを同時に提案するとのことです。

ipsec ike proposal-limitation 1 on

詳細内容については以下も合わせてご参照下さい。
ヤマハルーターに搭載されているIKEv2の機能

結果

  • IPSec状況
# show ipsec sa
Total: isakmp:2 send:2 recv:2

sa    sgw isakmp connection    dir  life[s] remote-id
----------------------------------------------------------------------------
1     1    -     ike           -    28790   【OCI_Global_IP1】
2     2    -     ike           -    28790   【OCI_Global_IP2】
3     1    1     tun[0001]esp  send 3590    【OCI_Global_IP1】
4     1    1     tun[0001]esp  recv 3590    【OCI_Global_IP1】
5     2    2     tun[0002]esp  send 3590    【OCI_Global_IP2】
6     2    2     tun[0002]esp  recv 3590    【OCI_Global_IP2】

tunnel2#
  • ルートテーブル
# show ip route  
Destination         Gateway          Interface       Kind  Additional Info.
default             【LAN GW】             LAN2    static  
10.105.1.0/24       192.168.0.10      TUNNEL[1]       BGP  path=31898
10.105.2.0/24       192.168.0.10      TUNNEL[1]       BGP  path=31898
192.168.0.8/30      -                 TUNNEL[1]  implicit  
192.168.0.12/30     -                 TUNNEL[2]  implicit  
192.168.100.0/24    192.168.100.1          LAN1  implicit  
【LANセグメント】/24   【LAN IP】          LAN2  implicit  
# 
  • Pingテスト
    OCIサーバーからオンプレへのping結果
[user@linux ~]$ ping 192.168.100.102
PING 192.168.100.102 (192.168.100.102) 56(84) bytes of data.
64 bytes from 192.168.100.102: icmp_seq=1 ttl=125 time=178 ms
64 bytes from 192.168.100.102: icmp_seq=2 ttl=125 time=187 ms
64 bytes from 192.168.100.102: icmp_seq=3 ttl=125 time=188 ms
64 bytes from 192.168.100.102: icmp_seq=4 ttl=125 time=188 ms
64 bytes from 192.168.100.102: icmp_seq=5 ttl=125 time=198 ms
64 bytes from 192.168.100.102: icmp_seq=6 ttl=125 time=194 ms
64 bytes from 192.168.100.102: icmp_seq=7 ttl=125 time=186 ms
^C
--- 192.168.100.102 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6000ms
rtt min/avg/max/mdev = 177.923/188.524/198.271/5.940 ms

オンプレからOCIサーバーへのping結果

C:\Path\to>ping 10.105.2.100 -t

10.105.2.100 に ping を送信しています 32 バイトのデータ:
10.105.2.100 からの応答: バイト数 =32 時間 =192ms TTL=60
10.105.2.100 からの応答: バイト数 =32 時間 =185ms TTL=60
10.105.2.100 からの応答: バイト数 =32 時間 =198ms TTL=60
10.105.2.100 からの応答: バイト数 =32 時間 =190ms TTL=60
10.105.2.100 からの応答: バイト数 =32 時間 =198ms TTL=60

10.105.2.100 の ping 統計:
    パケット数: 送信 = 5、受信 = 5、損失 = 0 (0% の損失)、
ラウンド トリップの概算時間 (ミリ秒):
    最小 = 185ms、最大 = 198ms、平均 = 192ms
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