9
16

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 5 years have passed since last update.

YAMAHA RTX1210でtunnel templateを使う

Posted at

これまで

例えば同時接続数3件だと

pp select anonymous
 pp bind tunnel1-tunnel3

(中略)

tunnel select 1
 tunnel encapsulation l2tp
 ipsec tunnel 1
  ipsec sa policy 1 1 esp aes-cbc sha-hmac
  ipsec ike keepalive use 1 off
  ipsec ike nat-traversal 1 on
  ipsec ike pre-shared-key 1 text himitsudayo
  ipsec ike remote address 1 any
 l2tp tunnel disconnect time off
 ip tunnel tcp mss limit auto
 tunnel enable 1
tunnel select 2
 tunnel encapsulation l2tp
 ipsec tunnel 2
  ipsec sa policy 2 2 esp aes-cbc sha-hmac
  ipsec ike keepalive use 2 off
  ipsec ike nat-traversal 2 on
  ipsec ike pre-shared-key 2 text himitsudayo
  ipsec ike remote address 2 any
 l2tp tunnel disconnect time off
 ip tunnel tcp mss limit auto
 tunnel enable 2
tunnel select 3
 tunnel encapsulation l2tp
 ipsec tunnel 3
  ipsec sa policy 3 3 esp aes-cbc sha-hmac
  ipsec ike keepalive use 3 off
  ipsec ike nat-traversal 3 on
  ipsec ike pre-shared-key 3 text himitsudayo
  ipsec ike remote address 3 any
 l2tp tunnel disconnect time off
 ip tunnel tcp mss limit auto
 tunnel enable 3

(中略)

ipsec transport 1 1 udp 1701
ipsec transport 2 2 udp 1701
ipsec transport 3 3 udp 1701

とかやってたんですが。
接続する人が増えた+台風襲来予告があり、同時接続数を一気に増やさなきゃいけないなーと。
めんどいけどさっくりスクリプト書いて投入しようかなーと思ったら、templateなるものがあることに気づいたわけで。

template使うとこうなる

以下は同時接続数10まで増やした場合。

pp select anonymous
 pp bind tunnel1-tunnel10

(中略)

tunnel select 1
 tunnel template 2-10
 tunnel encapsulation l2tp
 ipsec tunnel 1
  ipsec sa policy 1 1 esp aes-cbc sha-hmac
  ipsec ike keepalive use 1 off
  ipsec ike nat-traversal 1 on
  ipsec ike pre-shared-key 1 text himitsudayo
  ipsec ike remote address 1 any
 l2tp tunnel disconnect time off
 ip tunnel tcp mss limit auto
 tunnel enable 1
tunnel select 2
 ip tunnel tcp mss limit auto
tunnel select 3
 ip tunnel tcp mss limit auto
tunnel select 4
 ip tunnel tcp mss limit auto
tunnel select 5
 ip tunnel tcp mss limit auto
tunnel select 6
 ip tunnel tcp mss limit auto
tunnel select 7
 ip tunnel tcp mss limit auto
tunnel select 8
 ip tunnel tcp mss limit auto
tunnel select 9
 ip tunnel tcp mss limit auto
tunnel select 10
 ip tunnel tcp mss limit auto

(中略)

ipsec transport 1 1 udp 1701
ipsec transport template 1 2-10

だいぶすっきり。
ip tunnelが展開対象外なのが惜しいですが。

参考情報

何が展開されるとか、型番やファームウェアリビジョンごとの違いは以下を参考に。
http://www.rtpro.yamaha.co.jp/RT/manual/rt-common/ipsec/tunnel_template.html

機種別のトンネル最大数は以下を参考に。
http://www.rtpro.yamaha.co.jp/RT/FAQ/IPsec/faq_2_d.html

結果

結局台風がどっかに行ってしまったので、実戦検証できず。
折を見て、社員巻き込んで検証してみる予定です。

まとめ

相変わらず自分の投稿のタグがばらばらなの、どうにかしたいけどどうにもならない。

9
16
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
9
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?