インターネットアクセスのためにデフォルトルートを設定します。
ip route 192.168.1.0/24 IPsec0
IPsec
通信が必要なパケットを、IPsec
インタフェースに転送します。interface GigaEthernet0.0 ip napt enable
インターネットアクセスを行うため
NAPT
機能を有効化します。ip napt reserve esp ip napt reserve udp 500
ESP
、IKE(UDP500)
をNAPT
処理の対象から外します。ip napt reserve icmp
ICMP
をNAPT
処理の対象から外します。ip napt reserve icmp
は疎通確認の時のみに設定してください。フィルタが存在しない状態での設定はセキュリティが低くなる恐れがあります。
疎通確認の必要がない場合はフィルタの設定をおこなうか、設定を削除することをお 薦めします。
9.4. キャリアグレード NAT された通信網で IPsec 接続を行う
キャリアグレード
NAT
(ラージスケールNAT
)が設定されている通信事業者網で、IPsec
アグレッシブモードを使用してVPN
を構築する設定を説明します。本設定は、以下の環境を想定した設定例です。
・
NAT
トラバーサル機能を使用して、キャリアグレードNAT
間でIPsec
を確立します。・
IPsec
アグレッシブモード(装置Aはイニシエータ、装置Bはレスポンダ)を使用します。
・暗号化アルゴリズムは
AES-CBC
、認証アルゴリズムはSHA2 MAC
とします。・インターネットアクセスと
IPsec
によるVPN
接続(拠点間通信)の両方を行います。・動的
IP
が付与される拠点側は、ローカルID
を指定します。・固定
IP
が付与される拠点側は、リモートID
を指定します。・対向先(
Peer
)のIP
アドレスが動的アドレスとなる場合は、peer any
を指定します。■接続構成
■設定概要
以下の設定を行います。
・
GigaEthernet0.0
インタフェース設定・
MobileEthernet0.0
、GigaEthernet1.0
インタフェース設定・
IPsec
インタフェース設定・
IKE
プロポーザル設定・
IKE
ポリシー設定・
IPsec
プロポーザル設定・
IPsec
ポリシー設定・
IPsec
プロファイル設定・ ルーティング設定
・
NAPT
除外設定 メモ・
Version 3.0.x
、3.1.x
ではトンネルモードのみサポートのため、本コマンドの有無に関わらず
"tunnel"
以外の動作は出来ません。GE1.0
ME0 内蔵モジュール
((( 通信事業者モバイル 動的IP
固定IP 192.0.2.2/32 IPsec
端末B
IKEモード : Aggressive IPsec通信モード : Tunnel 暗号 : AES(256bit)
認証 : SHA2 DH-group : 768bit
192.168.1.0/24 192.168.2.0/24
GE1.0 GE0.0
端末A
装置B UNIVERGE WA2610-AP UNIVERGE
WA1511
インターネット サービス プロバイダ
アドレス変換 装置A
■設定(コンフィグ作成バージョン:
Ver7.3.7
)[
装置A:WA1511
設定]
! hostname WA1511
! no wireless-adapter enable
! interface GigaEthernet0.0 no ip address
shutdown
! interface GigaEthernet1.0 ip address 192.168.1.254/24 no shutdown
! interface Loopback0.0 ip address 127.0.0.1/8 no shutdown
! interface MobileEthernet0.0 ip address dhcp
ip napt enable ip napt reserve esp ip napt reserve udp 500 ip napt reserve udp 4500 ip napt reserve icmp mobile id IP example.net mobile username test mobile password plain test auto-connect
no shutdown
! interface IPsec0
ip address unnumbered ipsec map ipsecprof1 ip tcp adjust-mss auto no shutdown
! ip route default MobileEthernet0.0 ip route 192.168.2.0/24 IPsec0
! proxy-dns ip enable
proxy-dns server default MobileEthernet0.0 dhcp
! ike proposal ikeprop1
encryption-algorithm aes256-cbc
authentication-algorithm hmac-sha2-256 lifetime 28800
! ike policy ikepol1
pre-shared-key plain test
nat-traversal enable keepalive 30
! ipsec proposal ipsecprop1
protocol esp enc-algo aes256-cbc auth-algo hmac-sha2-256 lifetime 28800
! ipsec policy ipsecpol1 local-id 192.168.1.0/24 remote-id 192.168.2.0/24 proposal ipsecprop1
! ipsec profile ipsecprof1 mode tunnel
ipsec policy ipsecpol1 ike policy ikepol1 source Serial0 peer 192.0.2.2
!
[
装置B:WA2610-AP
設定]
! hostname WA2610-AP
! interface GigaEthernet0.0 ip address 192.0.2.2/32 ip napt enable
ip napt reserve esp ip napt reserve udp 500 ip napt reserve udp 4500 ip napt reserve icmp no shutdown
! interface GigaEthernet1.0 ip address 192.168.2.254/24 no shutdown
! interface Loopback0.0 ip address 127.0.0.1/8 no shutdown
! interface IPsec0
ip address unnumbered ipsec map ipsecprof1 ip tcp adjust-mss auto no shutdown
! ip route default GigaEthernet0.0 ip route 192.168.1.0/24 IPsec0
! proxy-dns ip enable
proxy-dns server default 192.0.2.3
! ike proposal ikeprop1
encryption-algorithm aes256-cbc
authentication-algorithm hmac-sha2-256 lifetime 28800
! ike policy ikepol1 mode aggressive remote-id key-id test2 dpd-keepalive enable 20 3 proposal ikeprop1
pre-shared-key plain test
nat-traversal enable keepalive 30
! ipsec proposal ipsecprop1
protocol esp enc-algo aes256-cbc auth-algo hmac-sha2-256 lifetime 28800
! ipsec policy ipsecpol1 local-id 192.168.2.0/24 remote-id 192.168.1.0/24 commit-bit enable
proposal ipsecprop1
! ipsec profile ipsecprof1 mode tunnel
ipsec policy ipsecpol1 ike policy ikepol1 source GigaEthernet0.0 peer any
!
■解説
[
装置A:WA1511
設定] ike proposal ikeprop1
IKE
プロポーザルを"ikeprop1"
で設定します。encryption-algorithm aes256-cbc
authentication-algorithm hmac-sha2-256
使用するセキュリティプロトコルとアルゴリズムを設定します。
暗号アルゴリズムを
"aes256-cbc"
、認証アルゴリズムを"hmac-sha2-256"
に設定します。lifetime 28800
IKE SA
の有効期間を"28800"
に設定します。(初期値:28800
)ike policy ikepol1
IKE
ポリシーを"ikepol1"
で設定します。mode aggressive
動作モードを
"aggressive"
に設定します。local-id key-id test2
IKE
フェーズ1
で送信する自装置のID
ペイロードを設定します。IPsec
トンネルの通信断をリアルタイムに検出するためにDPD-KeepAlive
機能を有効 化します。DPD-KeepAlive
の応答を受信できなくなると、SA
を削除します。回線契約が従量課金の場合、
DPD-KeepAlive
は課金対象となりますので送信間隔やリ トライ回数にご注意ください。proposal ikeprop1
IKE
プロポーザル"ikeprop1"
を適用します。pre-shared-key plain test
事前共有鍵(