Netskopeは、トラフィックルーティング方法としてインターネットプロトコルセキュリティ(IPSec)トンネルをサポートしています。IPSecトンネルを使用すると、ウェブトラフィック(ポート80および443)をNetskopeにルーティングできます。 Netskope IPSecゲートウェイで終端する論理トンネルインターフェイス。 NetskopeのユーザーインターフェースでIPSecトンネルを作成すると、Netskopeはファイアウォール上でトンネルを設定するためのパラメータを提供します。以下のIPSec設定では、Cisco IOS XEのコマンドと概念を使用しています。
このガイドでは、Netskopeと以下のCiscoルーター間でIPSecトンネルを設定する方法を説明します。
- Cisco CSR 1000v (VXE)、IOS XEバージョン17.03.03を実行中
- Cisco ISR 3900 (C3900-UNIVERSALK9-M) でIOS XEバージョン15.4(3)M3を実行中
IPSecには、トンネルモードとトランスポートモードの2つのモードがあります。このガイドはトンネルモード向けです。Cisco IOS XE の CLI 手順の詳細については、 Cisco のドキュメントを参照してください。
前提条件
IPSecを設定する前に、前提条件を確認してください。
NetskopeでIPSecトンネルを作成する
Netskope UIでCisco IOS XE用のIPSec VPNトンネルを作成するには、「 IPSecサイトの作成」を参照してください。
IKEv2キーリングの設定
プライマリおよびバックアップのIPSecトンネル用に、2つのIKEv2キーリングを設定します。
- Ciscoルーターにログインしてください。
- 設定モードに入ります:
# configure terminal
- プライマリIPSecトンネルのIKEv2キーリング名を入力してください。
(config)# crypto ikev2 keyring nskpkey1
- プライマリIPSecトンネルのピア名を入力してください。
(config-ikev2-keyring)# peer ipsecgw
- ピアのIPアドレスを入力してください。
(config-ikev2-keyring-peer)# address 10.136.176.30
- 相手のPSKを入力してください。
(config-ikev2-keyring-peer)# pre-shared-key local NetskopeTest
- バックアップIPSecトンネル用のIKEv2キーリング名を入力してください。
(config)# crypto ikev2 keyring nskpkey2
- バックアップIPSecトンネルのピア名を入力してください。
(config-ikev2-keyring)# peer ipsecgw2
- ピアのIPアドレスを入力してください。
(config-ikev2-keyring-peer)# address 10.136.176.31
- 相手のPSKを入力してください。
(config-ikev2-keyring-peer)# pre-shared-key local NetskopeTest
IKEv2プロファイルの構成
IKEv2キーリングに関連付ける2つのIKEv2プロファイルを設定します。IKEv2プロファイルは、IKE SAの交渉不可能なパラメータを定義します。
- プライマリIPSecトンネルのIKEv2プロファイル名を入力してください。
(config)# crypto ikev2 profile nsprofile1
- プライマリIKEv2プロファイルのマッチステートメントを定義します。
(config-ikev2-profile)# match identity remote address 10.136.176.30 255.255.255.255
- ローカルIKEv2 IDを入力してください。
(config-ikev2-profile)# identity local fqdn cisco123
- リモート認証方法を定義します。
(config-ikev2-profile)# authentication remote pre-share
- ローカル認証方法を定義します。
(config-ikev2-profile)# authentication local pre-share
- バックアップIPSecトンネル用に設定したIKEv2キーリング名を入力してください。
(config-ikev2-profile)# keyring local nskpkey1
- デッドピア検出(DPD)を有効にして、間隔を入力してください。
(config-ikev2-profile)# dpd 20 5 periodic
- バックアップIPSecトンネルのIKEv2プロファイル名を入力してください。
(config)# crypto ikev2 profile nsprofile2
- バックアップIKEv2プロファイルのマッチステートメントを定義します。
(config-ikev2-profile)# match identity remote address 10.136.176.31 255.255.255.255
- ローカルIKEv2 IDを入力してください。
(config-ikev2-profile)# identity local fqdn cisco4567
- リモート認証方法を定義します。
(config-ikev2-profile)# authentication remote pre-share
- ローカル認証方法を定義します。
(config-ikev2-profile)# authentication local pre-share
- バックアップIPSecトンネル用に設定したIKEv2キーリング名を入力してください。
(config-ikev2-profile)# keyring local nskpkey2
- DPDを有効にして、間隔を入力してください。
(config-ikev2-profile)# dpd 20 5 periodic
IPSec変換セットの定義
変換セットは、ピアが合意するセキュリティプロトコルとアルゴリズムを定義します。 IPSec SAネゴシエーション中に。
- 変換セットの名前を入力し、認証アルゴリズムと暗号化アルゴリズムを定義してください。
(config)# crypto ipsec transform-set nskptrans esp-gcm 256
- IPSecモードを定義します。
(cfg-crypto-trans)# mode tunnel
IPSecプロファイルの構成
変換セットとIKEv2プロファイルに関連付ける2つのIPSecプロファイルを設定します。
- プライマリIPSecトンネルのIPSecプロファイル名を入力してください。
(config)# crypto ipsec profile ipsec-prof-nskp1
- IPSecトンネル用に定義したIPSec変換セットを入力してください。
(ipsec-profile)# set transform-set nskptrans
- プライマリIPSecトンネル用に設定したIKEv2プロファイル名を入力してください。
(ipsec-profile)# set ikev2-profile nsprofile1
- バックアップIPSecトンネルのIPSecプロファイル名を入力してください。
(config)# crypto ipsec profile ipsec-prof-nskp2
- IPSecトンネル用に定義したIPSec変換セットを入力してください。
(ipsec-profile)# set transform-set nskptrans
- バックアップIPSecトンネル用に設定したIKEv2プロファイル名を入力してください。
(ipsec-profile)# set ikev2-profile nsprofile2
トンネルインターフェースの作成
IPSecプロファイルに関連付けるトンネルインターフェースを2つ作成します。
- IDを指定してプライマリトンネルインターフェースを作成します。
(config)# interface Tunnel1
- インターフェースのローカルIPアドレスを入力してください。どれでもお好きなものをお選びください。
(config-if)# ip address 10.0.0.1 255.255.255.0
- トンネルのソースインターフェースを設定します。これは、トンネルが接続されているインターフェースです。通常はルーターのパブリックインターフェースです。
(config-if)# tunnel source 192.168.180.3
- トンネルモードを定義します。
(config-if)# tunnel mode ipsec ipv4
- トンネルの宛先を、Netskope のプライマリ POP の IP アドレスに設定します。この IP アドレスは、 「Netskope で IPSec トンネルを作成する」でコピーしたものです。
(config-if)# tunnel destination 10.136.176.30
- プライマリIPSecトンネル用に設定したIPSecプロファイル名を入力してください。
(config-if)# tunnel protection ipsec profile ipsec-prof-nskp1
- IDを指定してバックアップトンネルインターフェースを作成します。
(config)# interface Tunnel2
- インターフェースのローカルIPアドレスを入力してください。どれでもお好きなものをお選びください。
(config-if)# ip address 9.0.0.1 255.255.255.0
- トンネルのソースインターフェースを設定します。これは、トンネルが接続されているインターフェースです。通常はルーターのパブリックインターフェースです。
(config-if)# tunnel source 192.168.180.3
- トンネルモードを定義します。
(config-if)# tunnel mode ipsec ipv4
- トンネル宛先を「 NetskopeでIPSecトンネルを作成」でコピーしたバックアップのNetskope POPのIPアドレスに設定してください:
(config-if)# tunnel destination 10.136.176.31
- バックアップIPSecトンネル用に設定したIPSecプロファイル名を入力してください。
(config-if)# tunnel protection ipsec profile ipsec-prof-nskp2
ACLとルートマップの設定
ルートマップを変更して、ポート80と443のウェブトラフィックのみをIPSecトンネル経由でルーティングできます。
アクセス制御リスト(ACL)とルートマップを設定するには:
- 一致させたいトラフィックに対してACLを作成し、ルートマップを適用します。
(config)# access-list 101 permit tcp any any eq www (config)# access-list 101 permit tcp any any eq 443
- トラフィックを照合するためのルートマップを定義します。
(config)# route-map netskope permit 5
- ステップ2で作成したルートマップにアクセスリストを割り当てます。
(config-route-map)# match ip address 101
- トンネルインターフェースを優先順位順に設定します。
(config-route-map)# set interface Tunnel1 Tunnel2
- トラフィックの経路変更元となるインターフェースにルートマップを適用します。
(config-route-map)# interface GigabitEthernet0/1 (config-if)# ip policy route-map netskope
サンプルCLI設定
以下は、CiscoルーターにおけるIPSecトンネルのCLI設定例です。
crypto ikev2 keyring nskpkey1
peer ipsecgw
address 10.136.176.30
pre-shared-key NetskopeTest
!
crypto ikev2 keyring nskpkey2
peer ipsecgw2
address 10.136.176.31
pre-shared-key NetskopeTest
!
crypto ikev2 profile nsprofile1
match fvrf any
match identity remote address 10.136.176.30 255.255.255.255
identity local fqdn cisco123
authentication remote pre-share
authentication local pre-share
keyring local nskpkey1
dpd 20 5 periodic
!
crypto ikev2 profile nsprofile2
match fvrf any
match identity remote address 10.136.176.31 255.255.255.255
identity local fqdn cisco4567
authentication remote pre-share
authentication local pre-share
keyring local nskpkey2
dpd 20 5 periodic
!
crypto ipsec transform-set nskptrans esp-gcm 256
mode tunnel
!
crypto ipsec profile ipsec-prof-nskp1
set transform-set nskptrans
set ikev2-profile nsprofile1
!
crypto ipsec profile ipsec-prof-nskp2
set transform-set nskptrans
set ikev2-profile nsprofile2
!
interface Tunnel1
ip address 10.0.0.1 255.255.255.0
tunnel source 192.168.180.3
tunnel mode ipsec ipv4
tunnel destination 10.136.176.30
tunnel protection ipsec profile ipsec-prof-nskp1
!
interface Tunnel2
ip address 9.0.0.1 255.255.255.0
tunnel source 192.168.180.3
tunnel mode ipsec ipv4
tunnel destination 10.136.176.31
tunnel protection ipsec profile ipsec-prof-nskp2
!
interface GigabitEthernet0/0
description "External network - VLAN180"
ip address 192.168.180.3 255.255.252.0
ip nat outside
ip virtual-reassembly in
duplex auto
speed auto
!
interface GigabitEthernet0/1
description "Internal network - VLAN119"
ip address 192.168.119.3 255.255.255.0
ip virtual-reassembly in
ip policy route-map netskope
duplex auto
speed auto
!
route-map netskope permit 5
match ip address 101
set interface Tunnel1 Tunnel2
!
access-list 101 permit tcp any any eq www
access-list 101 permit tcp any any eq 443
トラブルシューティング
次のいずれかのコマンドを使用して、Ciscoルーター上のIPSecトンネルのトラブルシューティングを行うことができます。 シスコルーター上のIPSecトンネルのトラブルシューティングを行うには、以下のいずれかのコマンドを実行してください。
トラブルシューティング フェーズ1
フェーズ1のトラブルシューティングを行うには、次のコマンドを入力してください。
# show crypto ikev2 sa
CLIの出力は以下のようになるはずです。
csr#sh crypto ikev2 session
IPv4 Crypto IKEv2 Session
Session-id:3326, Status:UP-ACTIVE, IKE count:1, CHILD count:1
Tunnel-id Local Remote fvrf/ivrf Status
2 10.2.10.85/4500 66.151.135.63/4500 none/none READY
Encr: AES-CBC, keysize: 256, PRF: SHA384, Hash: SHA384, DH Grp:14, Auth sign: PSK, Auth verify: PSK
Life/Active Time: 86400/11454 sec
Child sa: local selector 0.0.0.0/0 - 255.255.255.255/65535
remote selector 0.0.0.0/0 - 255.255.255.255/65535
ESP spi in/out: 0x8013BA61/0xC34C9E57
Session-id:3325, Status:UP-ACTIVE, IKE count:1, CHILD count:1
Tunnel-id Local Remote fvrf/ivrf Status
1 10.2.10.85/4500 163.116.136.184/4500 none/none READY
Encr: AES-CBC, keysize: 256, PRF: SHA384, Hash: SHA384, DH Grp:14, Auth sign: PSK, Auth verify: PSK
Life/Active Time: 86400/19347 sec
Child sa: local selector 0.0.0.0/0 - 255.255.255.255/65535
remote selector 0.0.0.0/0 - 255.255.255.255/65535
ESP spi in/out: 0x49262441/0xC09E0275
IPv6 Crypto IKEv2 Session
csr#sh crypto ikev2 sa
IPv4 Crypto IKEv2 SA
Tunnel-id Local Remote fvrf/ivrf Status
2 10.2.10.85/4500 66.151.135.63/4500 none/none READY
Encr: AES-CBC, keysize: 256, PRF: SHA384, Hash: SHA384, DH Grp:14, Auth sign: PSK, Auth verify: PSK
Life/Active Time: 86400/11123 sec
Tunnel-id Local Remote fvrf/ivrf Status
1 10.2.10.85/4500 163.116.136.184/4500 none/none READY
Encr: AES-CBC, keysize: 256, PRF: SHA384, Hash: SHA384, DH Grp:14, Auth sign: PSK, Auth verify: PSK
Life/Active Time: 86400/19016 sec
IPv6 Crypto IKEv2 SA
トラブルシューティング フェーズ2
フェーズ2のトラブルシューティングを行うには、次のコマンドを入力してください。
# show crypto ipsec sa
CLIの出力は以下のようになるはずです。
csr#sh crypto ipsec sa
interface: Tunnel1
Crypto map tag: Tunnel1-head-0, local addr 10.2.10.85
protected vrf: (none)
local ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
remote ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
current_peer 163.116.136.184 port 4500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 151253, #pkts encrypt: 151253, #pkts digest: 151253
#pkts decaps: 3771, #pkts decrypt: 3771, #pkts verify: 3771
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0
local crypto endpt.: 10.2.10.85, remote crypto endpt.: 163.116.136.184
plaintext mtu 1438, path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet1
current outbound spi: 0xC5EB7597(3320542615)
PFS (Y/N): N, DH group: none
inbound esp sas:
spi: 0x7B464481(2068202625)
transform: esp-gcm 256 ,
in use settings ={Tunnel UDP-Encaps, }
conn id: 17496, flow_id: CSR:15496, sibling_flags FFFFFFFF80000048, crypto map: Tunnel1-head-0
sa timing: remaining key lifetime (k/sec): (2560/73)
IV size: 8 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE)
inbound ah sas:
inbound pcp sas:
outbound esp sas:
spi: 0xC5EB7597(3320542615)
transform: esp-gcm 256 ,
in use settings ={Tunnel UDP-Encaps, }
conn id: 17495, flow_id: CSR:15495, sibling_flags FFFFFFFF80000048, crypto map: Tunnel1-head-0
sa timing: remaining key lifetime (k/sec): (2552/73)
IV size: 8 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE)
outbound ah sas:
outbound pcp sas:
interface: Tunnel2
Crypto map tag: Tunnel2-head-0, local addr 10.2.10.85
protected vrf: (none)
local ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
remote ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
current_peer 66.151.135.63 port 4500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 110, #pkts encrypt: 110, #pkts digest: 110
#pkts decaps: 112, #pkts decrypt: 112, #pkts verify: 112
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0
local crypto endpt.: 10.2.10.85, remote crypto endpt.: 66.151.135.63
plaintext mtu 1438, path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet1
current outbound spi: 0xCF1B446D(3474670701)
PFS (Y/N): N, DH group: none
inbound esp sas:
spi: 0x5C1B62E4(1545298660)
transform: esp-gcm 256 ,
in use settings ={Tunnel UDP-Encaps, }
conn id: 17494, flow_id: CSR:15494, sibling_flags FFFFFFFF80000048, crypto map: Tunnel2-head-0
sa timing: remaining key lifetime (k/sec): (2560/46)
IV size: 8 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE)
inbound ah sas:
inbound pcp sas:
outbound esp sas:
spi: 0xCF1B446D(3474670701)
transform: esp-gcm 256 ,
in use settings ={Tunnel UDP-Encaps, }
conn id: 17493, flow_id: CSR:15493, sibling_flags FFFFFFFF80000048, crypto map: Tunnel2-head-0
sa timing: remaining key lifetime (k/sec): (2560/46)
IV size: 8 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE) outbound ah sas:
outbound pcp sas:

