f1005防火墙主模式穿越配置案例,麻烦给一份
f1005防火墙主模式穿越配置案例,麻烦给一份
(0)
最佳答案
您好,请知:
可以参考如下NAT穿越的配置举例:
Device A在NAT安全网关内网侧。要求在Device A和Device B之间建立一个IPsec隧道,对Host A所在的子网(10.1.1.2/24)与Host B所在的子网(10.1.2.2/24)之间的数据流进行安全保护。具体需要求如下:
· 协商双方使用缺省的IKEv2安全提议和IKEv2安全策略。
· 第一阶段协商的认证方法为预共享密钥认证。
图3-4 IKEv2 NAT穿越配置组网图
?
(1) 配置接口IP地址、路由、安全域及域间策略保证网络可达,具体配置步骤略
(2) 定义数据流
# 配置ACL 3101,定义要保护由子网10.1.1.0/24去往子网10.1.2.0/24的数据流。
<DeviceA> system-view
[DeviceA] acl advanced 3101
[DeviceA-acl-ipv4-adv-3101] rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255
[DeviceA-acl-ipv4-adv-3101] quit
(3) 配置IPsec安全提议
# 创建IPsec安全提议transform1。
[DeviceA] ipsec transform-set transform1
# 配置采用的安全协议为ESP。
[DeviceA-ipsec-transform-set-transform1] protocol esp
# 配置ESP协议采用的加密算法为3DES,认证算法为HMAC-MD5。
[DeviceA-ipsec-transform-set-transform1] esp encryption-algorithm 3des-cbc
[DeviceA-ipsec-transform-set-transform1] esp authentication-algorithm md5
[DeviceA-ipsec-transform-set-transform1] quit
(4) 配置IKEv2 keychain
# 创建IKEv2 keychain,名称为keychain1。
[DeviceA] ikev2 keychain keychain1
# 创建IKEV2对端,名称为peer1。
[DeviceA-ikev2-keychain-keychain1] peer peer1
# 指定对端peer1的主机地址为2.2.2.2/16。
[DeviceA-ikev2-keychain-keychain1-peer-peer1] address 2.2.2.2 16
# 指定对端 peer1 的身份信息。
[DeviceA-ikev2-keychain-keychain1-peer-peer1] identity address 2.2.2.2
# 配置对端peer1使用的预共享密钥为明文123。
[DeviceA-ikev2-keychain-keychain1-peer-peer1] pre-shared-key plaintext 123
[DeviceA-ikev2-keychain-keychain1-peer-peer1] quit
[DeviceA-ikev2-keychain-keychain1] quit
(5) 配置IKEv2 profile
# 创建IKEv2 profile,名称为profile1。
[DeviceA] ikev2 profile profile1
# 指定引用的IKEv2 keychain为keychain1。
[DeviceA-ikev2-profile-profile1] keychain keychain1
# 配置本端身份为FQDN名称***.***。
[DeviceA-ikev2-profile-profile1] identity local fqdn ***.***
# 配置匹配对端身份的规则为IP地址2.2.2.2/16。
[DeviceA-ikev2-profile-profile1] match remote identity address 2.2.2.2 255.255.0.0
# 指定本端的身份认证方式为预共享密钥。
[DeviceA-ikev2-profile-profile1] authentication-method local pre-share
# 指定对端的身份认证方式为预共享密钥。
[DeviceA-ikev2-profile-profile1] authentication-method remote pre-share
[DeviceA-ikev2-profile-profile1] quit
(6) 配置IPsec安全策略
# 创建一条IKEv2协商方式的IPsec安全策略,名称为policy1,顺序号为1。
[DeviceA] ipsec policy policy1 1 isakmp
# 配置IPsec隧道的对端IP地址为2.2.2.2。
[DeviceA-ipsec-policy-isakmp-policy1-1] remote-address 2.2.2.2
# 指定引用的安全提议为transform1。
[DeviceA-ipsec-policy-isakmp-policy1-1] transform-set transform1
# 指定引用ACL 3101。
[DeviceA-ipsec-policy-isakmp-policy1-1] security acl 3101
# 指定引用的IKEv2 profile为profile1。
[DeviceA-ipsec-policy-isakmp-policy1-1] ikev2-profile profile1
[DeviceA-ipsec-policy-isakmp-policy1-1] quit
(7) 在接口上应用IPsec安全策略
# 在接口GigabitEthernet1/0/1上应用IPsec安全策略policy1。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] ipsec apply policy policy1
[DeviceA-GigabitEthernet1/0/1] quit
(8) 配置静态路由
# 配置到Host B所在子网的静态路由。
[DeviceA] ip route-static 10.1.2.0 255.255.255.0 1.1.1.2
(1) 配置接口IP地址、路由、安全域及域间策略保证网络可达,具体配置步骤略
(2) 定义数据流
# 配置ACL 3101,定义要保护由子网10.1.2.0/24去往子网10.1.1.0/24的数据流。
<DeviceB> system-view
[DeviceB] acl advanced 3101
[DeviceB-acl-ipv4-adv-3101] rule 0 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255
[DeviceB-acl-ipv4-adv-3101] quit
(3) 配置IPsec安全提议
# 创建IPsec安全提议transform1。
[DeviceB] ipsec transform-set transform1
# 配置采用的安全协议为ESP。
[DeviceB-ipsec-transform-set-transform1] protocol esp
# 配置ESP协议采用的加密算法为3DES,认证算法为HMAC-MD5。
[DeviceB-ipsec-transform-set-transform1] esp encryption-algorithm 3des-cbc
[DeviceB-ipsec-transform-set-transform1] esp authentication-algorithm md5
[DeviceB-ipsec-transform-set-transform1] quit
(4) 配置IKEv2 keychain
# 创建IKEv2 keychain,名称为keychain1。
[DeviceB]ikev2 keychain keychain1
# 创建IKEV2对端,名称为peer1。
[DeviceB-ikev2-keychain-keychain1] peer peer1
# 指定对端 peer1 的主机地址为3.3.3.1/16。
[DeviceB-ikev2-keychain-keychain1-peer-peer1] address 3.3.3.1 16
# 指定对端 peer1的身份信息。
[DeviceB-ikev2-keychain-keychain1-peer-peer1] identity address 3.3.3.1
# 配置对端peer1使用的预共享密钥为明文123。
[DeviceB-ikev2-keychain-keychain1-peer-peer1] pre-shared-key plaintext 123
[DeviceB-ikev2-keychain-keychain1-peer-peer1] quit
[DeviceB-ikev2-keychain-keychain1] quit
(5) 配置IKEv2 profile
# 创建IKEv2 profile,名称为profile1。
[DeviceB] ikev2 profile profile1
# 指定引用的IKEv2 keychain为keychain1。
[DeviceB-ikev2-profile-profile1] keychain keychain1
# 配置匹配对端身份的规则为FQDN名称***.***。
[DeviceB-ikev2-profile-profile1] match remote identity fqdn ***.***
# 指定本端的身份认证方式为预共享密钥。
[DeviceB-ikev2-profile-profile1] authentication-method local pre-share
# 指定对端的身份认证方式为预共享密钥。
[DeviceB-ikev2-profile-profile1] authentication-method remote pre-share
[DeviceB-ikev2-profile-profile1] quit
(6) 配置IPsec安全策略模板
# 创建一个IKEv2协商方式的IPsec安全策略模板,名称为template1,顺序号为1。
[DeviceB] ipsec policy-template template1 1
# 配置IPsec隧道的对端IP地址为3.3.3.1。
[DeviceB-ipsec-policy-template-template1-1] remote-address 3.3.3.1
# 指定引用ACL 3101。
[DeviceB-ipsec-policy-template-template1-1] security acl 3101
# 指定引用的安全提议为transform1。
[DeviceB-ipsec-policy-template-template1-1] transform-set transform1
# 指定引用的IKEv2 profile为profile1。
[DeviceB-ipsec-policy-template-template1-1] ikev2-profile profile1
[DeviceB-ipsec-policy-template-template1-1] quit
(7) 创建IPsec安全策略
# 引用IPsec安全策略模板创建一条IKEv2协商方式的IPsec安全策略,名称为policy1,顺序号1。
[DeviceB] ipsec policy policy1 1 isakmp template template1
(8) 在接口上应用IPsec安全策略
# 在接口GigabitEthernet1/0/1上应用安全策略policy1。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ipsec apply policy policy1
[DeviceB-GigabitEthernet1/0/1] quit
(9) 配置静态路由
# 配置到Host A所在子网的静态路由。2.2.2.1为本例中的直连下一跳地址,实际使用中请以具体组网情况为准。
[DeviceB] ip route-static 10.1.1.0 255.255.255.0 2.2.2.1
以上配置完成后,子网10.1.1.0/24若向子网10.1.2.0/24发送报文,将触发IKEv2协商。
# 可通过如下显示信息查看到Device A上IKEv2协商成功后生成的IKEv2 SA。
[DeviceA] display ikev2 sa
Tunnel ID?? Local?????????????????????? Remote????????????????????? Status
---------------------------------------------------------------------------
? 1????? ??1.1.1.1/4500??????? ??????????2.2.2.2/4500??????? ??????????EST
Status:
IN-NEGO: Negotiating, EST: Established, DEL:Deleting
?[DeviceA] display ikev2 sa verbose
? Tunnel ID: 45????????????????????????????????????????????????????????????????
? Local IP/Port: 1.1.1.1/4500???? ??????????????????????????????????????????????
? Remote IP/Port: 2.2.2.2/4500?????????????????????????????????????????????????
? Outside VRF: -???????????????????????????????????????????????????????????????
? Inside VRF: -??????????????????????????????? ?????????????????????????????????
? Local SPI: 372228d699a33c63??????????????????????????????????????????????????
? Remote SPI: 75c537621b4a7190?????????????????????????????????????????????????
??????????????????????????????????????????????????????????? ????????????????????
? Local ID type: ID_FQDN???????????????????????????????????????????????????????
? Local ID: ***.***????????????????????????????????????????????????????
? Remote ID type: ID_IPV4_ADDR?????????????????????????????????????????? ???????
? Remote ID: 2.2.2.2???????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????
? Auth sign method: Pre-shared key?????????????????????????????????????????????
? Auth verify method: Pre-shared key???????????????????????????????????????????
? Integrity algorithm: SHA1????????????????????????????????????????????????????
? PRF algorithm: SHA1??????????????????????????????????????????????????????????
? Encryption algorithm: AES-CBC-128????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????
? Life duration: 86400 secs????????????????????????????????????????????????????
? Remaining key duration: 86177 secs???????????????????????????????????????????
? Diffie-Hellman group: MODP1536/Group5????????????????????????????????????????
? NAT traversal: Detected??????????????????????????????????????????????????????
? DPD: Interval 0 secs, retry interval 0 secs??????????????????????????????????
? Transmitting entity: Initiator???????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????
? Local window: 1??????????????????????????????????????????????????????????????
? Remote window: 1?????????????????????????????????????????????????????????????
? Local request message ID: 2??????????????????????????????????????????????????
? Remote request message ID: 0?????????????????????????????????????????????????
? Local next message ID: 2?????????????????????????????????????????????????????
? Remote next message ID: 0???
# 可通过如下显示信息查看到IKEv2协商生成的IPsec SA。
[DeviceA] display ipsec sa
-------------------------------
Interface: GigabitEthernet1/0/1
-------------------------------
? -----------------------------
? IPsec policy: policy1
? Sequence number: 1
? Mode: ISAKMP
? -----------------------------
??? Tunnel id: 0
??? Encapsulation mode: tunnel
??? Perfect Forward Secrecy:
??? Inside VPN:????????????????????????????????????????????????????????????????
??? Extended Sequence Numbers enable: N????????????????????????????????????????
? ??Traffic Flow Confidentiality enable: N
??? Path MTU: 1435
??? Tunnel:
??????? local? address: 1.1.1.1
??????? remote address: 2.2.2.2
??? Flow:
??????? sour addr: 10.1.1.0/255.255.255.0? port: 0? protocol: ip
??????? dest addr: 10.2.1.0/255.255.255.0? port: 0? protocol: ip
??? [Inbound ESP SAs]
????? SPI: 830667426 (0x3182faa2)
????? Connection ID: 605590388736
????? Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5
????? SA duration (kilobytes/sec): 1843200/3600
????? SA remaining duration (kilobytes/sec): 1843200/2313
????? Max received sequence-number:
????? Anti-replay check enable: Y
????? Anti-replay window size: 64
????? UDP encapsulation used for NAT traversal: Y
????? Status: Active
??? [Outbound ESP SAs]
????? SPI: 3516214669 (0xd1952d8d)
????? Connection ID: 227633266689
????? Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5
????? SA duration (kilobytes/sec): 1843200/3600
????? SA remaining duration (kilobytes/sec): 1843200/2313
????? Max sent sequence-number:
????? UDP encapsulation used for NAT traversal: Y
????? Status: Active
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论