2
4

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.

ヤマハのルータとのL2TP接続を複数ユーザに対応する

Posted at

去年、「Windows10とヤマハのルータ間でL2TP接続をする」という記事を書きましたが、今回は複数ユーザが同時に接続出来るようにしたいという要件に対応したので、そのメモです。

環境

ルータ

機種: RTX810
ファーム: Rev.11.01.33

やったこと

tunnel追加

前回はtunnel3にL2TP設定をしました。
同時接続を実現するにはユーザごとにtunnelを確保する必要があるので同じ設定を追加していきます。
ここでは2ユーザ分追加して全部で3ユーザが同時接続できるようにします。


### TUNNEL 4 ###

tunnel select 4
 tunnel encapsulation l2tp
 ipsec tunnel 4
  ipsec sa policy 4 4 esp aes-cbc sha-hmac
  ipsec ike keepalive log 4 off
  ipsec ike keepalive use 4 off
  ipsec ike local address 4 192.168.0.1
  ipsec ike nat-traversal 4 on
  ipsec ike pre-shared-key 4 text ${shared-key}
  ipsec ike remote address 4 any
 l2tp tunnel auth off 
 l2tp keepalive use on
 l2tp syslog on
 ip tunnel tcp mss limit auto
 tunnel enable 4

### TUNNEL 5 ###

tunnel select 5
 tunnel encapsulation l2tp
 ipsec tunnel 5
  ipsec sa policy 5 5 esp aes-cbc sha-hmac
  ipsec ike keepalive log 5 off
  ipsec ike keepalive use 5 off
  ipsec ike local address 5 192.168.0.1
  ipsec ike nat-traversal 5 on
  ipsec ike pre-shared-key 5 text ${shared-key}
  ipsec ike remote address 5 any
 l2tp tunnel auth off 
 l2tp keepalive use on
 l2tp syslog on
 ip tunnel tcp mss limit auto
 tunnel enable 5

tunnel_idやpolicy_idを更新した以外は内容はすべて一緒です。
事前共有キーもpp anonymousに設定した同じものをすべてのtunnelに指定する必要があります。

IPSecのトランスポートモード設定

作成したポリシーのトランスポートモードを追加します。

ipsec transport 4 4 udp 1701
ipsec transport 5 5 udp 1701

pp設定

### PP anonymous ###

pp select anonymous
 pp bind tunnel3 tunnel4 tunnel5
 pp auth username ${userA} ${passwordA}
 pp auth username ${userB} ${passwordB}
 pp auth username ${userC} ${passwordC}

pp anonymousに追加した各tunnelをbindします。
ユーザを必要数分追加します。

完了です

これで作成した各ユーザが同時に接続できるようになりました。
トランスポートモードの追加とかbindの追加とかを忘れがちなので備忘録です。

なお、ユーザをどれほど増やせるかについては、各機種でいくつまでトンネルを作れるかの数字と一致します。
詳細は公式のドキュメントを参照。

参考:トンネルの数(VPNの対地数)に制限はありますか?

今回使用している機器はRTX810なので最大トンネル数は6です。

2
4
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
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?