ip napt reserve udp 4500
9.5. peerFQDN を使用して動的 IP アドレス環境で IPsec 接続を行う
動的
IP
アドレス対向の環境において、Dynamic DNS
と組み合わせることで、対向装置のIP
アドレスをFQDN
指定することが可能となり、IPsec
接続を確立することが可能です。WAN
回線のIP
アドレスが接続毎に変化する契約の場合でもIPsec
通信が可能となります。IPsec
のメインモードでpeer
コマンドのFQDN
オプションを使用した場合の設定を説明します。
本設定は、以下の環境を想定した設定例です。
・
IPsec
アグレッシブモード(装置Aはイニシエータ、装置Bはレスポンダ)を使用します。
・暗号化アルゴリズムは
AES-CBC
、認証アルゴリズムはSHA2 MAC
とします。・装置A、Bとも
WAN
側IP
アドレスは動的IP
アドレスを使用します。・装置A、Bともインターネットアクセスが可能なように
NAPT
を設定します。・
Dynamic DNS
サービス名をtestddns
、ユーザ名をabcdef
、パスワードをdynamic
、FQDN
を
wa*.example.net
と設定します。サービスは架空のものです。■接続構成
■設定概要
以下の設定を行います。
・ ルータモード設定
・
IPsec
インタフェース設定・
IKE
プロポーザル設定・
IKE
ポリシー設定・
IPsec
プロポーザル設定・
IPsec
ポリシー設定・
IPsec
プロファイル設定GE1.0 ME0.0
(内蔵モジュール)
(((
モバイル 通信事業者 インターネット サービスプロバイダ 動的IP
IPsec
端末B
IKEモード : aggressive IPsec通信モード : Tunnel 暗号 : AES(256bit)
認証 : SHA2 DH-group : 768bit 192.168.1.0/24
192.168.2.0/24 GE1.0 PPPoE
端末A
装置B 動的IP
DynamicDNS
サービス名称:testddns ユーザ名 : abcdef パスワード : dynamic
FQDN : wa2.example.com
装置A
UNIVERGE WA2610-AP UNIVERGE
WA1511
・
LAN
インタフェース設定・
WAN
インタフェース設定・ スタティックルート設定
・ プロキシ
DNS
設定・
Dynamic DNS
設定メモ
・メインモードの利用はソフトウェアバージョン
4.0
から、ソフトウェアバージョン3.2
以前はアグレッシブモードのみ利用可能です。・
Peer FQDN
の設定はアグレッシブモードのイニシエータ側でのみ利用できます。・装置
A
にIKE
ポリシーのアグレッシブモードのDPD KeepAlive
の設定をすることを推 奨します。DPD KeepAlive
の設定がされないと、装置B
側の回線が切断された場合、SA
が切れたのち、rekey
によってSA
が更新されるまで通信ができません。・
Version 3.0.x
、3.1.x
ではトンネルモードのみサポートのため、本コマンドの有無に関わらず
"tunnel"
以外の動作は出来ません。■設定(コンフィグ作成バージョン:
Ver7.1.3
)[
装置A:WA1511
設定]
hostname WA1511
! no wireless-adapter enable
! interface GigaEthernet0.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 icmp mobile id IP example.net auto-connect
no shutdown
! interface IPsec0
ip address unnumbered ipsec map ipsecprof1 no shutdown
! ip route 192.168.2.0/24 IPsec0 ip route default MobileEthernet0.0
! 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 mode aggressive local-id key-id test2 dpd-keepalive enable proposal ikeprop1
pre-shared-key plain test
! 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 MobileEthernet0.0 peer wa2.example.net
!
[
装置B:WA2610-AP
設定]
hostname WA2610-AP! ppp profile pppoe
authentication username test@example.net authentication password plain test
! interface GigaEthernet0.0 no ip address
encapsulation PPPoE0 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 PPPoE0 ip address ipcp ip tcp adjust-mss auto ppp profile pppoe auto-connect ip napt enable ip napt reserve esp ip napt reserve udp 500 ip napt reserve icmp no shutdown
! interface IPsec0
ip address unnumbered ipsec map ipsecprof1 no shutdown
!
proxy-dns server default PPPoE0 ipcp
! 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 proposal ikeprop1
pre-shared-key plain test
! 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 PPPoE0 peer any
! ddns enable ddns interval 1
ddns account testddns interface PPPoE0 wa2.example.net username abcdef
password plain dynamic
!
■解説
[
装置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
動作モードを