在v7版本ipsec policy shujujifang 50 isakmp 里写
transform-set shujujifang //调用加密方式
security acl 3001// 调用感兴趣流
local-address 【】 //本地公网地址
remote-address 10.41.97.1 /对端fqdn名
ike-profile 10.41.97.1
对端v5墙的
’remote-address xxxx /对端fqdn名‘ 对应哪句命令
(0)
给你个配置案例,对照改下吧
V5路由器对接V7路由器IPSec VPN
#路由器基本上网配置省略,MSR V5路由器的上网具体设置步骤请参考“2.1.2 路由器外网使用固定IP地址上网配置方法”章节中“MSR830[930][2600]系列路由器基本上网(静态IP)命令行配置(V5)”案例,MSR V7路由器的上网具体设置步骤请参考“2.1.2 路由器外网使用固定IP地址上网配置方法”章节中“MSR830-WiNet系列路由器基本上网(静态IP)命令行配置(V7)”案例
# 配置一个访问控制列表3000,定义由子网192.168.1.0/24去子网172.16.1.0/24的数据流。
<H3C>system-view
[H3C]acl number 3000
[H3C-acl-adv-3000]rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 172.16.1.0 0.0.0.255
[H3C-acl-adv-3000]quit
#配置公网口NAT要关联的ACl 3001,作用是把IPSec感兴趣流从NAT转换的数据流deny掉,防止IPSec数据流被NAT优先转换
[H3C]acl number 3001
[H3C-acl-adv-3001]rule 0 deny ip source 192.168.1.0 0.0.0.255 destination 172.16.1.0 0.0.0.255
[H3C-acl-adv-3001]rule 1 permit ip
[H3C-acl-adv-3001]quit
# 创建一条IKE提议1,指定IKE提议使用的认证算法为MD5,加密算法为3des-cbc
[H3C]ike proposal 1
[H3C-ike-proposal-1]authentication-algorithm md5
[H3C-ike-proposal-1]encryption-algorithm 3des-cbc
[H3C-ike-proposal-1]quit
# 配置IPSec安全提议v5,配置ESP协议采用的加密算法为3des,采用的认证算法md5
[H3C]ipsec transform-set v5
[H3C-ipsec-transform-set-v5]encapsulation-mode tunnel
[H3C-ipsec-transform-set-v5]transform esp
[H3C-ipsec-transform-set-v5]esp encryption-algorithm 3des
[H3C-ipsec-transform-set-v5]esp authentication-algorithm md5
[H3C-ipsec-transform-set-v5]quit
# 创建IKE对等体v5,预共享密钥为123456,引用之前创建的IKE安全提议1,配置对端地址为对端公网接口地址2.2.2.2,本地地址为本端的公网接口地址1.1.1.1
[H3C]ike peer v5
[H3C-ike-peer-v5]pre-shared-key 123456
[H3C-ike-peer-v5]proposal 1
[H3C-ike-peer-v5]remote-address 1.1.1.1
[H3C-ike-peer-v5]local-address 2.2.2.2
[H3C-ike-peer-v5]quit
# 创建一条IPSec安全策略v5,协商方式为isakmp。引用之前创建的感兴趣数据流ACL3000,引用之前创建的对等体v5,引用之前的IPSec安全提议v5
[H3C]ipsec policy v5 1 isakmp
[H3C-ipsec-policy-isakmp-v5-1]security acl 3000
[H3C-ipsec-policy-isakmp-v5-1]ike-peer v5
[H3C-ipsec-policy-isakmp-v5-1]transform-set v5
[H3C-ipsec-policy-isakmp-v5-1]quit
#设置外网口做NAT转换的时候关联ACL 3001 (如果之前已经在外网口配置了 nat outbound,需要先undo掉),并将IPSec安全策略v5应用在外网接口
[H3C]interface GigabitEthernet 0/1
[H3C-GigabitEthernet0/1]undo natbound
[H3C-GigabitEthernet0/1]nat outbound 3001
[H3C-GigabitEthernet0/1]ipsec policy v5
[H3C-GigabitEthernet0/1]quit
# 配置一个访问控制列表,定义由子网172.16.1.0/24去子网192.168.1.0/24的数据流。
<H3C>system-view
[H3C]acl advanced 3000
[H3C-acl-ipv4-adv-3000]rule 0 permit ip source 172.16.1.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
[H3C-acl-ipv4-adv-3000]quit
#配置公网口NAT要关联的ACl 3001,作用是把IPSec感兴趣流从NAT转换的数据流deny掉,防止IPSec数据流被NAT优先转换
[H3C]acl advanced 3001
[H3C-acl-ipv4-adv-3001]rule 0 deny ip source 172.16.1.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
[H3C-acl-ipv4-adv-3001]rule 1 permit ip
[H3C-acl-adv-3001]quit
# 创建一条IKE提议1,指定IKE提议使用的认证算法为MD5,加密算法为3des-cbc
[H3C]ike proposal 1
[H3C-ike-proposal-1]authentication-algorithm md5
[H3C-ike-proposal-1]encryption-algorithm 3des-cbc
[H3C-ike-proposal-1]quit
[H3C]ike keychain v7
#配置对端IP地址为1.1.1.1,使用的预共享密钥为明文123456
[H3C-ike-keychain-v7]pre-shared-key address 1.1.1.1 255.255.255.0 key simple 123456
[H3C-ike-keychain-v7]quit
# 创建并配置IKE profile,名称为v7,引用上面配置的keychain v7,配置本地地址为本端的公网接口地址2.2.2.2,对端地址为对端公网接口地址1.1.1.1,引用之前配置IKE提议1
[H3C]ike profile v7
[H3C-ike-profile-v7]keychain v7
[H3C-ike-profile-v7]local-identity address 2.2.2.2
[H3C-ike-profile-v7]match remote identity address 1.1.1.1 255.255.255.0
[H3C-ike-profile-v7]proposal 1
[H3C-ike-profile-v7]quit
# 配置IPsec安全提议v7,ESP协议采用的加密算法为3des-cbc,认证算法为md5
[H3C]ipsec transform-set v7
[H3C-ipsec-transform-set-v7]encapsulation-mode tunnel
[H3C-ipsec-transform-set-v7]esp encryption-algorithm 3des-cbc
[H3C-ipsec-transform-set-v7]esp authentication-algorithm md5
[H3C-ipsec-transform-set-v5]quit
#创建IPsec安全策略,名称为v7,序列号为1,设置对端地址为对端公网地址1.1.1.1,引用之前创建的ACL3000,引用之前创建的IKE profile v7,引用之前的IPSec安全提议v7
[H3C]ipsec policy v7 1 isakmp
[H3C-ipsec-policy-isakmp-v7-1]remote-address 1.1.1.1
[H3C-ipsec-policy-isakmp-v7-1]security acl 3000
[H3C-ipsec-policy-isakmp-v7-1]transform-set v7
[H3C-ipsec-policy-isakmp-v7-1]ike-profile v7
[H3C-ipsec-policy-isakmp-v7-1]quit
#设置外网口做NAT转换的时候关联ACL 3001 (如果之前已经在外网口配置了 nat outbound,需要先undo掉),并将IPSec安全策略v7应用在外网接口
[H3C]interface GigabitEthernet 0/1
[H3C-GigabitEthernet0/1]undo nat outbound
[H3C-GigabitEthernet0/1]nat outbound 3001
[H3C-GigabitEthernet0/1]ipsec apply policy v7
[H3C-GigabitEthernet0/1]quit
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论