双方のルータがともに複数のグローバルアドレスを割り当てられているときの 設定例です。 1つのグローバルアドレスをルータに占有させて、 IPsecの通信がNATの影響を受けないようにしています。
インターネットへ インターネットへ
| |
| 1.5Mbit/s専用線 | 128kbit/s専用線
| |
| アドレス: 固定 | アドレス: 固定
| 172.16.0.0/24 | 172.17.0.0/24
| |
+--------+--------+ +--------+--------+
| | <######## VPN ########> | |
| ルータ1 | | ルータ2 |
| 名前:router1 | 暗号方式: 3DES-CBC | 名前:router2 |
| | 認証方式: HMAC-SHA1 | |
+--------+--------+ +--------+--------+
| 192.168.0.1/24 | 192.168.1.1/24
| |
| |
---------+---- 192.168.0.0/24 ---------+---- 192.168.1.0/24
Rev.6.02系のファームウェアの設定例です。
[ルータ1の設定例]
# # WAN line type # line type pri1 leased pri leased channel 1/1 1 24 # # LAN1 interface # ip lan1 address 192.168.0.1/24 # # PP interface # pp select 1 pp bind pri1/1 ip route default gateway pp 1 ppp ccp type none pp auth accept pap chap pp auth myname NAME PASSWORD ip pp address 172.16.0.1 ip pp nat descriptor 1 pp enable 1 # # IKE # ipsec auto refresh on ipsec ike local address 1 172.16.0.1 ipsec ike remote address 1 172.17.0.1 ipsec ike pre-shared-key 1 text himitsu ipsec sa policy 101 1 esp 3des-cbc sha-hmac # # TUNNEL interface # tunnel select 1 ipsec tunnel 101 ip route 192.168.1.0/24 gateway tunnel 1 tunnel enable 1 # # NAT descriptor # nat descriptor type 1 nat-masquerade nat descriptor address outer 1 172.16.0.2-172.16.0.254 nat descriptor address inner 1 192.168.0.1-192.168.0.254
[ルータ2の設定例]
# # WAN line type # bri line 1 l128 # # LAN1 interface # ip lan1 address 192.168.1.1/24 # # PP interface # pp select 1 pp bind bri1 ip route default gateway pp 1 ppp ccp type none pp auth accept pap chap pp auth myname NAME PASSWORD ip pp address 172.17.0.1 ip pp nat descriptor 1 pp enable 1 # # IKE # ipsec auto refresh on ipsec ike local address 1 172.17.0.1 ipsec ike remote address 1 172.16.0.1 ipsec ike pre-shared-key 1 text himitsu ipsec sa policy 101 1 esp 3des-cbc sha-hmac # # TUNNEL interface # tunnel select 1 ipsec tunnel 101 ip route 192.168.0.0/24 gateway tunnel 1 tunnel enable 1 # # NAT descriptor # nat descriptor type 1 nat-masquerade nat descriptor address outer 1 172.17.0.2-172.17.0.254 nat descriptor address inner 1 192.168.1.1-192.168.1.254