1)、//IPsec感兴趣数据流配置
acl number 3000
rule 5 permit ip source 192.168.0.0 0.0.0.255 destination 192.168.10.0 0.0.0.255
2)、//第一阶段参数配置和AF的参数方式一致
ike proposal 1
encryption-algorithm 3des //配置IKE安全提议中使用的加密算法为3des
dh group2 //DH群组2
sa duration 3600 //SA超时时间为3600
#
ike peer ike261115182368
exchange-mode auto //协商模式为自动
pre-shared-key %$%$>MUmGhf(*.kFC~26z~uX)MD;%$%$ //预共享密钥,和AF一致
ike-proposal 1 //引用已配置的IKE安全提议
undo version 2 //去使能IKE版本2,也就是用IKE版本1
remote-id-type none //不校验对端ID类型
remote-address 200.200.200.2 //对端地址
undo nat traversal //去使能NAT穿越
3)、//第二阶段参数配置和AF的参数方式一致
ipsec proposal prop26111518236
encapsulation-mode auto //配置报文的封装模式为自动
esp authentication-algorithm sha1 //ESP认证算法为sha1
esp encryption-algorithm 3des //ESP加密算法为3des
#
ipsec policy ipsec2611151823 1 isakmp
security acl 3000 //配置安全策略引用的ACL为3000
pfs dh-group2 //配置安全策略进行协商时使用PFS特性
ike-peer ike261115182368 //在安全策略中引用IKE对等体
alias IPSEC
proposal prop26111518236 //安全策略中引用的IPSec安全提议
sa duration traffic-based 1843200 //SA基于流量超时为1843200
sa duration time-based 3600 //SA基于时间超时为3600
4)、//IPSEC应用在外网接口
interface Ethernet0/0/0
ip address 100.100.100.2 255.255.255.0
ipsec policy ipsec2611151823 auto-neg
5)、//IPSEC的流量不做NAT转换, policy 0是不做NAT转换的策略, policy 1是内网地址转换的策略。
nat-policy interzone trust untrust outbound
policy 0
action no-nat
policy source 192.168.0.0 mask 24
policy destination 192.168.10.0 mask 24
policy 1
action source-nat
policy source 192.168.0.0 mask 24
easy-ip Ethernet0/0/0