2台都是msr2600,怎么配置IPSEC VPN? 两地都是拨号上网。
(0)
IPSEC野蛮模式实验报告
(两端无固定公网地址)
杭州华三通信技术有限公司
Hangzhou H3C Technologies Co., Ltd.
版权所有 侵权必究
All rights reserved
1.PC1(192.168.0.2)和PC2(192.168.1.2)分别是两台防火墙内网里的终端,通过防火墙访问外网。终端网关在防护墙上。
2.FW1和FW2均拨号上网,没有固定的公网地址,但是申请了动态域名,FW1域名为***.***,FW2域名为***.***。
3.图中的DNS服务器用交换机代替,配置静态DNS实现域名解析。
在防火墙之间建立野蛮模式的ipsec VPN,使得PC1和PC能互通,同时也能正常访问公网。
首先给图中设备配置好IP地址,在此步骤省略。
SW配置:
dns proxy enable
ip host ***.*** 1.1.1.1
ip host ***.*** 1.1.1.2
#
interface Vlan-interface1
ip address 1.1.1.3 255.255.255.0
FW1配置如下:
#
dns server 1.1.1.3
#
interface GigabitEthernet1/0/0
port link-mode route
combo enable copper
ip address 1.1.1.1 255.255.255.0
nat outbound 3001
ipsec apply policy 1
#
interface GigabitEthernet1/0/1
port link-mode route
combo enable copper
ip address 192.168.0.1 255.255.255.0
#
security-zone name Trust
import interface GigabitEthernet1/0/1
#
security-zone name Untrust
import interface GigabitEthernet1/0/0
#
ip route-static 0.0.0.0 0 1.1.1.2
#
acl advanced 3001
rule 0 deny ip source 192.168.0.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
rule 5 permit ip
#
ipsec transform-set 1
esp encryption-algorithm 3des-cbc
esp authentication-algorithm sha1
#
ipsec policy-template 1 1
transform-set 1
ike-profile 1
#
ipsec policy 1 1 isakmp template 1
#
ike profile 1
keychain 1
exchange-mode aggressive
local-identity fqdn fw1
match remote identity fqdn fw2
proposal 1
#
ike proposal 1
#
ike keychain 1
pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456
#
security-policy ip
rule 1 name 1
action pass
source-zone untrust
source-zone trust
source-zone local
destination-zone trust
destination-zone untrust
destination-zone local
# FW2配置:
#
dns server 1.1.1.3
#
interface GigabitEthernet1/0/0
port link-mode route
combo enable copper
ip address 1.1.1.2 255.255.255.0
nat outbound 3001
ipsec apply policy 1
#
interface GigabitEthernet1/0/1
port link-mode route
combo enable copper
ip address 192.168.1.1 255.255.255.0
#
security-zone name Trust
import interface GigabitEthernet1/0/1
#
security-zone name Untrust
import interface GigabitEthernet1/0/0
#
ip route-static 0.0.0.0 0 1.1.1.1
#
acl advanced 3000
rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
#
acl advanced 3001
rule 0 deny ip source 192.168.1.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
rule 5 permit ip
#
ipsec transform-set 1
esp encryption-algorithm 3des-cbc
esp authentication-algorithm sha1
#
ipsec policy 1 1 isakmp
transform-set 1
security acl 3000
remote-address ***.***
ike-profile 1
#
ike profile 1
keychain 1
exchange-mode aggressive
local-identity fqdn fw2
match remote identity fqdn fw1
proposal 1
#
ike proposal 1
#
ike keychain 1
pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456
#
security-policy ip
rule 1 name 1
action pass
source-zone untrust
source-zone trust
source-zone local
destination-zone trust
destination-zone untrust
destination-zone local
#
结果
PC2pingPC1能通:
ike sa和ipsec sa也有:
(0)
您好,请知:
部署IPSEC VPN,必须要有一端为固定IP地址方可实现。
以下是IPSEC IKE 野蛮模式的配置举例,请参考:
设备运行于FIPS模式时,不支持本例。
Device A在NAT安全网关内网侧,所连接的内网侧用户使用NAT地址3.3.3.1访问外网。要求在Device A和Device B之间建立一个IPsec隧道,对Host A所在的子网(10.1.1.0/24)与Host B所在的子网(10.1.2.0/24)之间的数据流进行安全保护。具体需要求如下:
· 协商双方使用缺省的IKE提议。
· 协商模式为野蛮模式协商。
· 第一阶段协商的认证方法为预共享密钥认证。
图2-6 IKE野蛮模式及NAT穿越典型组网图
(1) 配置Device A
# 配置各接口的IP地址,具体略。
# 配置IPv4高级ACL 3000,定义要保护由子网10.1.1.0/24去往子网10.1.2.0/24的数据流。
<DeviceA> system-view
[DeviceA] acl advanced 3000
[DeviceA-acl-ipv4-adv-3000] 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-3000] quit
# 创建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
# 创建IKE keychain,名称为keychain1。
[DeviceA] ike keychain keychain1
# 配置与IP地址为2.2.2.2的对端使用的预共享密钥为明文12345zxcvb!@#$%ZXCVB。
[DeviceA-ike-keychain-keychain1] pre-shared-key address 2.2.2.2 255.255.0.0 key simple 12345zxcvb!@#$%ZXCVB
[DeviceA-ike-keychain-keychain1] quit
# 创建IKE profile,名称为profile1。
[DeviceA] ike profile profile1
# 指定引用的IKE keychain为keychain1。
[DeviceA-ike-profile-profile1] keychain keychain1
# 配置协商模式为野蛮模式。
[DeviceA-ike-profile-profile1] exchange-mode aggressive
# 配置本端身份为FQDN名称***.***。
[DeviceA-ike-profile-profile1] local-identity fqdn ***.***
# 配置匹配对端身份的规则为IP地址2.2.2.2/16。
[DeviceA-ike-profile-profile1] match remote identity address 2.2.2.2 255.255.0.0
[DeviceA-ike-profile-profile1] quit
# 创建一条IKE协商方式的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 3000。
[DeviceA-ipsec-policy-isakmp-policy1-1] security acl 3000
# 指定引用的IKE profile为profile1。
[DeviceA-ipsec-policy-isakmp-policy1-1] ike-profile profile1
[DeviceA-ipsec-policy-isakmp-policy1-1] quit
# 在接口GigabitEthernet1/0/1上应用IPsec安全策略policy1。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] ipsec apply policy policy1
[DeviceA-GigabitEthernet1/0/1] quit
# 配置到Host B所在子网的静态路由。
[DeviceA] ip route-static 10.1.2.0 255.255.255.0 1.1.1.2
(2) 配置Device B
# 配置各接口的IP地址,具体略。
# 创建IPsec安全提议transform1。
<DeviceB> system-view
[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
# 创建IKE keychain,名称为keychain1。
[DeviceB]ike keychain keychain1
# 配置与IP地址为1.1.1.1的对端使用的预共享密钥为明文12345zxcvb!@#$%ZXCVB。在本例中,来自1.1.1.1的报文经NAT转换后,源IP地址被转换为3.3.3.1,因此指定预共享密钥时对端IP地址为3.3.3.1。
[DeviceB-ike-keychain-keychain1] pre-shared-key address 3.3.3.1 255.255.0.0 key simple 12345zxcvb!@#$%ZXCVB
[DeviceB-ike-keychain-keychain1] quit
# 创建IKE profile,名称为profile1。
[DeviceB] ike profile profile1
# 指定引用的IKE keychain为keychain1。
[DeviceB-ike-profile-profile1] keychain keychain1
# 配置协商模式为野蛮模式。
[DeviceB-ike-profile-profile1] exchange-mode aggressive
# 配置匹配对端身份的规则为FQDN名称***.***。
[DeviceB-ike-profile-profile1] match remote identity fqdn ***.***
[DeviceB-ike-profile-profile1] quit
# 创建一个IKE协商方式的IPsec安全策略模板,名称为template1,顺序号为1。
[DeviceB] ipsec policy-template template1 1
# 指定引用的安全提议为tran1。
[DeviceB-ipsec-policy-template-template1-1] transform-set transform1
# 配置IPsec隧道的本端IP地址为2.2.2.2。
[DeviceB-ipsec-policy-template-template1-1] local-address 2.2.2.2
# 指定引用的IKE profile为profile1。
[DeviceB-ipsec-policy-template-template1-1] ike-profile profile1
[DeviceB-ipsec-policy-template-template1-1] quit
# 引用IPsec安全策略模板创建一条IKE协商方式的IPsec安全策略,名称为policy1,顺序号为1。
[DeviceB] ipsec policy policy1 1 isakmp template template1
# 在接口GigabitEthernet1/0/1上应用安全策略policy1。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ipsec apply policy policy1
[DeviceB-GigabitEthernet1/0/1] quit
# 配置到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发送报文,将触发IKE协商。
# 可通过如下显示信息查看到Device A上IKE第一阶段协商成功后生成的IKE SA
[DeviceA] display ike sa
Connection-ID Remote Flag DOI
------------------------------------------------------------------
13 2.2.2.2 RD IPsec
Flags:
RD--READY RL--REPLACED FD-FADING RK-REKEY
[DeviceA] display ike sa verbose
-----------------------------------------------
Connection ID: 13
Outside VPN:
Inside VPN:
Profile: profile1
Transmitting entity: Initiator
Initiator COOKIE: 1bcf453f0a217259
Responder COOKIE: 5e32a74dfa66a0a4
-----------------------------------------------
Local IP: 1.1.1.1
Local ID type: FQDN
Local ID: ***.***
Remote IP: 2.2.2.2
Remote ID type: IPV4_ADDR
Remote ID: 2.2.2.2
Authentication-method: PRE-SHARED-KEY
Authentication-algorithm: SHA1
Encryption-algorithm: DES-CBC
Life duration(sec): 86400
Remaining key duration(sec): 84565
Exchange-mode: Aggressive
Diffie-Hellman group: Group 1
NAT traversal: Detected
Extend authentication: Disabled
Assigned IP address:
Vendor ID index: 0xa1d
Vendor ID sequence number: 0x0
# 可通过如下显示信息查看到IKE第二阶段协商生成的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.1.2.0/255.255.255.0 port: 0 protocol: ip
[Inbound ESP SAs]
SPI: 830667426 (0x3182faa2)
Connection ID: 90194313219
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: 64424509441
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)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
如何配置呢