室井の部屋
VPN
最終更新:
momijimanjyu
-
view
はじめに
Policy-BaseVPNとRoute-BaseVPNの違いは、その名の通り、VPNをPolicyではるかRoutingではるかの違い。
個人的にはRoute-BaseVPNの方が管理が楽。
個人的にはRoute-BaseVPNの方が管理が楽。
Policy-BaseVPN
WEBUI
①Phase1設定
VPNs > AutoKey Advanced > Gateway [New]
Gateway Name:P1-TEST(好きな名前)
Security Level:Custum(好きなレベル)
Static IP Address:1.1.1.1(相手NSのWAN-IP)
Preshared Key:(好きなキー)※両端NSで共通の必要有り
Outgoing Interface:eth0/0(基本的にWANのインターフェース)※張り方次第
[Advanced]クリック
Phase 1 Proposal:pre-g2-3des-md5※両端NSで共通の必要有り
(P1暗号化選択・・・preで始まるのがPreshared Keyを使った暗号化アルゴリズム)
Mode (Initiator):Main
Heartbeat: hellow:5 Reconnect:60 Threshold:5(任意。好きなように)
[Return]クリック
[OK]クリック
①Phase1設定
VPNs > AutoKey Advanced > Gateway [New]
Gateway Name:P1-TEST(好きな名前)
Security Level:Custum(好きなレベル)
Static IP Address:1.1.1.1(相手NSのWAN-IP)
Preshared Key:(好きなキー)※両端NSで共通の必要有り
Outgoing Interface:eth0/0(基本的にWANのインターフェース)※張り方次第
[Advanced]クリック
Phase 1 Proposal:pre-g2-3des-md5※両端NSで共通の必要有り
(P1暗号化選択・・・preで始まるのがPreshared Keyを使った暗号化アルゴリズム)
Mode (Initiator):Main
Heartbeat: hellow:5 Reconnect:60 Threshold:5(任意。好きなように)
[Return]クリック
[OK]クリック
②Phase2設定
VPNs > AutoKey IKE [New]
VPN Name:P2-TEST(好きな名前)
Security Level:Custum(好きなレベル)
Remote Gateway:P1-TEST(①で作ったP1プロファイル名)
[Advanced]クリック
Phase 2 Proposal:g2-esp-3des-md5※両端NSで共通の必要有り
Replay Protection:チェック(よく解らんが毎回チェックします)
VPN Monitor:チェック(両端でチェックしておくとSAのリンク状態がmonitor項目で確認出来る)
[Return]クリック
[OK]クリック
VPNs > AutoKey IKE [New]
VPN Name:P2-TEST(好きな名前)
Security Level:Custum(好きなレベル)
Remote Gateway:P1-TEST(①で作ったP1プロファイル名)
[Advanced]クリック
Phase 2 Proposal:g2-esp-3des-md5※両端NSで共通の必要有り
Replay Protection:チェック(よく解らんが毎回チェックします)
VPN Monitor:チェック(両端でチェックしておくとSAのリンク状態がmonitor項目で確認出来る)
[Return]クリック
[OK]クリック
②Policy設定
Policies
from:Trust to:Untrust [New]
Source Address:Any
Destination Address:192.168.1.0/24
Service:Any
Action:Tunnel
Tunnel VPN:P2-TEST
Modify matching bidirectional VPN policyにチェック(Untrust→Trustも作ってくれる)
[OK]クリック
Policies
from:Trust to:Untrust [New]
Source Address:Any
Destination Address:192.168.1.0/24
Service:Any
Action:Tunnel
Tunnel VPN:P2-TEST
Modify matching bidirectional VPN policyにチェック(Untrust→Trustも作ってくれる)
[OK]クリック
完了
イメージは対向とのVPNトンネルをPolicyによって作成
Route-BaseVPN
WEBUI
①Tunnelインターフェイス作成
Network > Interfaces (List) [New] [Tunnel IF]
Tunnel Interface Name:tunnel.1
Zone(VR):Trust(Trust-vr)※どのZoneに紐付けるか
Fixed IP:0.0.0.0
※TunnelインターフェイスのIP設定。対向もセグメントを合わせる必要あり。
面倒なので0.0.0.0にしちゃうとTunnel内でセグメントを持たない。
or
Unnumbered:eth0/0(Trust-vr)※どのInterfaceに紐付けるか
[OK]クリック
①Tunnelインターフェイス作成
Network > Interfaces (List) [New] [Tunnel IF]
Tunnel Interface Name:tunnel.1
Zone(VR):Trust(Trust-vr)※どのZoneに紐付けるか
Fixed IP:0.0.0.0
※TunnelインターフェイスのIP設定。対向もセグメントを合わせる必要あり。
面倒なので0.0.0.0にしちゃうとTunnel内でセグメントを持たない。
or
Unnumbered:eth0/0(Trust-vr)※どのInterfaceに紐付けるか
[OK]クリック
②Phase1設定
VPNs > AutoKey Advanced > Gateway [New]
Gateway Name:P1-TEST(好きな名前)
Security Level:Custum(好きなレベル)
Static IP Address:1.1.1.1(相手NSのWAN-IP)
Preshared Key:(好きなキー)※両端NSで共通の必要有り
Outgoing Interface:eth0/0(基本的にWANのインターフェース)※張り方次第
[Advanced]クリック
Phase 1 Proposal:pre-g2-3des-md5※両端NSで共通の必要有り
(P1暗号化選択・・・preで始まるのがPreshared Keyを使った暗号化アルゴリズム)
Mode (Initiator):Main
Heartbeat: hellow:5 Reconnect:60 Threshold:5(任意。好きなように)
[Return]クリック
[OK]クリック
VPNs > AutoKey Advanced > Gateway [New]
Gateway Name:P1-TEST(好きな名前)
Security Level:Custum(好きなレベル)
Static IP Address:1.1.1.1(相手NSのWAN-IP)
Preshared Key:(好きなキー)※両端NSで共通の必要有り
Outgoing Interface:eth0/0(基本的にWANのインターフェース)※張り方次第
[Advanced]クリック
Phase 1 Proposal:pre-g2-3des-md5※両端NSで共通の必要有り
(P1暗号化選択・・・preで始まるのがPreshared Keyを使った暗号化アルゴリズム)
Mode (Initiator):Main
Heartbeat: hellow:5 Reconnect:60 Threshold:5(任意。好きなように)
[Return]クリック
[OK]クリック
③Phase2設定
VPNs > AutoKey IKE [New]
VPN Name:P2-TEST(好きな名前)
Security Level:Custum(好きなレベル)
Remote Gateway:P1-TEST(①で作ったP1プロファイル名)
[Advanced]クリック
Phase 2 Proposal:g2-esp-3des-md5※両端NSで共通の必要有り
Replay Protection:チェック(よく解らんが毎回チェックします)
Bind to→Tunnel Interface:tunnel.1
VPN Monitor:チェック(両端でチェックしておくとSAのリンク状態がmonitor項目で確認出来る)
[Return]クリック
[OK]クリック
VPNs > AutoKey IKE [New]
VPN Name:P2-TEST(好きな名前)
Security Level:Custum(好きなレベル)
Remote Gateway:P1-TEST(①で作ったP1プロファイル名)
[Advanced]クリック
Phase 2 Proposal:g2-esp-3des-md5※両端NSで共通の必要有り
Replay Protection:チェック(よく解らんが毎回チェックします)
Bind to→Tunnel Interface:tunnel.1
VPN Monitor:チェック(両端でチェックしておくとSAのリンク状態がmonitor項目で確認出来る)
[Return]クリック
[OK]クリック
④Routing設定
Network > Routing > Routing Entries (trust-vr) [New]
IP Address/Netmask:あて先IPセグメント指定
Next Hop→Gateway→Interface:tunnel.1
[OK]クリック
※あて先セグメント分設定(アドレス集約、サブネット対応)
Network > Routing > Routing Entries (trust-vr) [New]
IP Address/Netmask:あて先IPセグメント指定
Next Hop→Gateway→Interface:tunnel.1
[OK]クリック
※あて先セグメント分設定(アドレス集約、サブネット対応)
完了
イメージは対向とのVPNトンネルをRoutingによって作成