4
5

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.

RTX1210 L2TP/IPsecを利用したリモートアクセスVPNの設定

Last updated at Posted at 2019-11-14

RTX1210に複数ユーザからのリモートアクセスができるよう、設定します。

参考
https://network.yamaha.com/setting/router_firewall/vpn/vpn_client/vpn-smartphone-setup_rtx1200

環境

  • 利用機器:Yamaha RTX1210

  • VPNプロトコル:L2TP/IPSec

  • L2TPクライアント

  • 接続元IPアドレス:不定

  • 5ユーザ同時接続

  • ネットワーク設定

  • ルータのLAN側NW:192.168.100.0/24

  • ルータのLAN側IPアドレス:192.168.100.1

  • クライアント割り当てIPアドレス:192.168.100.10 - 20/24

RTX1210設定

【】内は環境に合わせて設定が必要です。

・デフォルトGW設定

ip route default gateway 【XX.XX.XX.XX】

・LAN側NW設定

ip lan1 address 192.168.100.1/24
ip lan1 proxyarp on

・WAN側NW設定

ip lan2 address 【XX.XX.XX.XX/XX】
ip lan2 nat descriptor 100

・L2TP接続の受け入れ設定

pp select anonymous
 pp bind tunnel1-tunnel5
 pp auth request mschap-v2
 pp auth username 【ユーザ名1】 【パスワード1】
 pp auth username 【ユーザ名2】 【パスワード2】
 pp auth username 【ユーザ名3】 【パスワード3】
 pp auth username 【ユーザ名4】 【パスワード4】
 pp auth username 【ユーザ名5】 【パスワード5】
 ppp ipcp ipaddress on
 ppp ipcp msext on
 ppp ccp type mppe-any
 ip pp remote address pool dhcp
 ip pp mtu 1280
 ip pp nat descriptor 100
 pp enable anonymous

・L2TP接続で使用するトンネルの設定

tunnel設定はトンネルテンプレートで展開します
http://www.rtpro.yamaha.co.jp/RT/manual/rt-common/ipsec/tunnel_template.html

tunnel select 1
tunnel template 2-5
 tunnel encapsulation l2tp
 ipsec tunnel 1
  ipsec sa policy 1 1 esp aes-cbc sha-hmac
  ipsec ike keepalive use 1 off
  ipsec ike local address 1 192.168.100.1
  ipsec ike nat-traversal 1 on
  ipsec ike pre-shared-key 1 text 【事前共有鍵】
  ipsec ike remote address 1 any
 l2tp tunnel disconnect time off
 l2tp keepalive use on 10 3
 l2tp keepalive log on
 l2tp syslog on
 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

・NATの設定

NAT処理の外側IPアドレスは、ip interface address コマンドで設定されている IP アドレス利用のため
primaryに設定します。
http://www.rtpro.yamaha.co.jp/RT/manual/rt-common/nat/nat_descriptor_address_outer.html

nat descriptor type 100 masquerade
nat descriptor address outer 100 primary
nat descriptor address inner 100 auto
nat descriptor masquerade static 100 1 192.168.100.1 udp 500,4500
nat descriptor masquerade static 100 2 192.168.100.1 esp

・DHCP設定

dhcp service server
dhcp server rfc2131 compliant except remain-silent
dhcp scope 1 192.168.100.10-192.168.100.20/24 gateway 192.168.100.1

・IPSecトランスモード設定

こちらもテンプレートを利用します。
http://www.rtpro.yamaha.co.jp/RT/manual/rt-common/ipsec/ipsec_transport_template.html

ipsec auto refresh on
ipsec transport 1 1 udp 1701
ipsec transport template 1 2-5

・L2TPの設定

l2tp service on

・保存

save

接続端末設定(Windows10の場合)

ネットワークとインターネット → VPNから設定します。

  • VPNプロバイダー:Windows(ビルトイン)
  • サーバ名またはアドレス:ルータIPアドレス
  • VPNの種類:事前共有キーを使ったL2TP/IPsec
  • 事前共有キー:ルータに設定した事前共有鍵
  • サインイン情報の種類:ユーザ名とパスワード
  • ユーザ名:ルータに設定したユーザ名
  • パスワード:ルータに設定したパスワード
    キャプチャ.PNG

保存して接続します。
正しく接続できていれば、リモート接続した端末からルータのLAN側NWへアクセス可能です。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?