PPPoEでインターネットに接続している拠点間をアライドテレシスと富士通のルータを使い、IPsecで結ぶVPN構築例です。
インターネットサービスプロバイダー(以下 ISP)から固定IPアドレスが割り当てられるルーター間をIPsec(ESP)トンネルで接続します。
アライドテレシスの設定例集や富士通の技術情報にこの組み合わせの例がなかったので公開しました。
アライドテレシス AT-AR2050V と 富士通 Si-R G100Bの組み合わせで検証しました。
構成
ルーターA (AT-AR2050V) |
ルーターB (Si-R G100B) |
|
ISPから提供された情報 | ||
ISP接続用ユーザー名 | user@isp1 | user@isp2 |
ISP接続用パスワード | isppasswd1 | isppasswd2 |
PPPoEサービス名 | 指定なし | 指定なし |
WAN側IPアドレス | 10.0.0.1/32 | 10.0.0.2/32 |
ルーターの基本設定 | ||
WAN側物理インターフェース | eth1 | ETHER グループ1 ポート1 |
WAN側(ppp0)IPアドレス | 10.0.0.1/32 | 10.0.0.2/32 |
LAN側(vlan1)IPアドレス | 192.168.10.1/24 | 192.168.20.1/24 |
VPN接続設定 | ||
ローカルセレクター | 0.0.0.0/0(デフォルト) | なし |
リモートセレクター | 0.0.0.0/0(デフォルト) | なし |
IKEフェーズ1(ISAKMP)設定 | ||
IKEバージョン・交換モード | IKEv1 Mainモード | |
アルゴリズム | AES128 / SHA256 / Group2 | |
ローカルID | 始点アドレス(デフォルト) | 始点アドレス |
SA有効期間 | 1時間 | |
IKEフェーズ2(IPsec)設定 | ||
アルゴリズム | AES128 / SHA256 |
ルーターA(AT-AR2050V)の設定
解説はこちらを参照。AT-AR3050SおよびAT-AR4050Sでも同じ設定のはず。
no spanning-tree rstp enable
!
service telnet
!
zone private
network lan
ip subnet 192.168.10.0/24
network peer
ip subnet 192.168.20.0/24 interface tunnel0
network tunnel
ip subnet 192.168.100.0/30
!
firewall
rule 10 permit esp from public.wan.ppp0 to public.wan
rule 20 permit esp from public.wan to public.wan.ppp0
rule 30 permit isakmp from public.wan.ppp0 to public.wan
rule 40 permit isakmp from public.wan to public.wan.ppp0
rule 50 permit any from private to private
rule 60 permit any from private to public
rule 70 permit ping from public to public
protect
!
zone public
network wan
ip subnet 0.0.0.0/0 interface ppp0
host ppp0
ip address 10.0.0.1
!
application esp
protocol 50
!
application isakmp
protocol udp
sport 500
dport 500
!
nat
rule 10 masq any from private to public
enable
!
crypto ipsec profile ipsec1
lifetime seconds 3600
transform 1 protocol esp integrity SHA256 encryption AES128
!
crypto isakmp profile isakmp1
version 1 mode main
lifetime 3600
transform 1 integrity SHA256 encryption AES128 group 2
!
crypto isakmp key secret address 10.0.0.2
!
crypto isakmp peer address 10.0.0.2 profile isakmp1
!
interface eth1
encapsulation ppp 0
!
interface vlan1
ip address 192.168.10.1/24
!
!
interface tunnel0
tunnel source 10.0.0.1
tunnel destination 10.0.0.2
tunnel protection ipsec profile ipsec1
tunnel mode ipsec ipv4
ip address 192.168.100.1/30
ip tcp adjust-mss 1260
mtu 1300
!
interface ppp0
keepalive
ip address 10.0.0.1/32
ppp username user@isp1
ppp password isppasswd1
ip tcp adjust-mss pmtu
!
ip route 0.0.0.0/0 ppp0
ip route 192.168.20.0/24 tunnel0
ip route 192.168.20.0/24 Null 254
ルーターB(Si-R G100B)の設定
詳細はコマンドリファレンスやコマンド設定事例集のマニュアルを参照。Si-R G120/G121/G210/G211シリーズでも大差ないはず。(未確認)
ether 1 1 vlan untag 1
ether 2 1 vlan untag 2
ether 2 2 vlan untag 2
ether 2 3 vlan untag 2
ether 2 4 vlan untag 2
lan 1 ip address 192.168.20.1/24 3
lan 1 vlan 2
remote 0 name ISP-B
remote 0 mtu 1454
remote 0 ap 0 name PPPoE
remote 0 ap 0 datalink bind vlan 1
remote 0 ap 0 ppp auth send user@isp2 isppasswd2
remote 0 ap 0 keep connect
remote 0 ppp ipcp vjcomp disable
remote 0 ip address local 10.0.0.2
remote 0 ip route 0 default 1 1
remote 0 ip nat mode multi 10.0.0.2 1 5m
remote 0 ip nat static 0 10.0.0.2 500 10.0.0.2 500 17
remote 0 ip nat static 1 10.0.0.2 any 10.0.0.2 any 50
remote 0 ip msschange 1414
remote 1 name AR2050V
remote 1 ap 0 name ipsec
remote 1 ap 0 datalink type ipsec
remote 1 ap 0 ipsec type ike
remote 1 ap 0 ipsec ike protocol esp
remote 1 ap 0 ipsec ike encrypt aes-cbc-128
remote 1 ap 0 ipsec ike auth hmac-sha256
remote 1 ap 0 ike shared key text secret
remote 1 ap 0 ike proposal 0 encrypt aes-cbc-128
remote 1 ap 0 ike proposal 0 hash hmac-sha256
remote 1 ap 0 ike proposal 0 pfs modp1024
remote 1 ap 0 ike proposal 0 lifetime 1h
remote 1 ap 0 ike dpd use on
remote 1 ap 0 tunnel local 10.0.0.2
remote 1 ap 0 tunnel remote 10.0.0.1
remote 1 ap 0 sessionwatch address 192.168.20.1 192.168.10.1
remote 1 ip route 0 192.168.10.0/24 1 0
remote 1 ip msschange 1300
syslog facility 23
time zone 0900
consoleinfo autologout 8h
telnetinfo autologout 5m
SAの確認
awplus#show isakmp sa
--------------------------------------------------------------------------------
Peer Cookies (initiator:responder) Auth Ver Expires
Encryption Integrity Group DPD NATT State
--------------------------------------------------------------------------------
10.0.0.2 4c31301dce789d18:c76b5547b120759c PSK 1 3002s
AES128 SHA256 2 yes no Established
awplus#show ipsec sa
-----------------------------------------------------------------------------
Peer SPI (in:out) Mode Proto Expires
Encryption Integrity PFS
-----------------------------------------------------------------------------
10.0.0.2 c302d553:02338a8a tunnel ESP 2517s
AES128 SHA256 -
Si-R G100B# show ipsec sa
[IPsec SA Information]
[1] Remote Name(AR2050V), rmt1, ap0
Side(Responder), Gateway(10.0.0.1, 10.0.0.2), OUT
Protocol(ESP), Enctype(aes-cbc-128), Authtype(hmac-sha256), PFS(off)
Status(mature), Spi=3271742803(0xc302d553)
Created(Jan 1 10:52:27 1970), NewSA(3570secs, 0Kbyte)
Lifetime(3600secs), Current(1200secs), Remain(2400secs)
Lifebyte(0Kbyte), Current(12Kbyte), Remain(0Kbyte)
[2] Remote Name(AR2050V), rmt1, ap0
Side(Responder), Gateway(10.0.0.2, 10.0.0.1), IN
Protocol(ESP), Enctype(aes-cbc-128), Authtype(hmac-sha256), PFS(off)
Status(mature), Spi=36932234(0x02338a8a)
Created(Jan 1 10:52:27 1970), NewSA(3570secs, 0Kbyte)
Lifetime(3600secs), Current(1200secs), Remain(2400secs)
Lifebyte(0Kbyte), Current(12Kbyte), Remain(0Kbyte)
[IKE SA Information]
[1] Destination(10.0.0.1.500), Source(10.0.0.2.500), rmt1
Cookies(4c31301dce789d18:c76b5547b120759c)
Side(Responder), Status(ESTABLISHED), Exchangetype(MAIN)
IKE Version(1), Authmethod(shared-key), DPD(enable)
Enctype(aes-cbc-128), Hashtype(hmac-sha256), PFS(modp1024)
Created(Jan 1 11:01:13 1970)
Lifetime(3600secs), Current(674secs), Remain(2926secs)
使ってみての所感
AT-ARシリーズのトンネルインタフェースはunnumberedにできない。またtelnetやsshコマンドはソースアドレスの指定ができない。このため、トンネルの向こう側にあるルータにtelnetでの接続ができなかった。
トンネルインタフェースをunnumberedにできるようになってほしいなぁ。
検証に使用したバージョン
AT-AR2050V | Si-R G100B |
---|---|
AlliedWare Plus (TM) 5.4.9 08/23/19 03:59:10 | Firm Ver. : V04.12 NY0040 Wed Aug 4 08:27:12 JST 2021 |