- 2008-108日
IKE VPN
本节介绍通过IKE 方式创建安全联盟的实例。
组网需求
在Hillstone 安全网关A 和Hillstone 安全网关B 之间建立一个安全隧道,PC1作为Hillstone 安全网关A 端的主机,IP 地址为10.1.1.1,网关为10.1.1.2;Server1 作为Hillstone 安全网关B 端的服务器,IP 地址为192.168.1.1,网关是192.168.1.2。要求对PC1 代表的子网(10.1.1.0/24)与server1 代表的子网(192.168.1.0/24)之间的数据流进行安全保护(通过基于路由的VPN 方式实现VPN 的应用)。安全协议采用ESP 协议,加密算法采用3DES,验证算法采用SHA1。

配置步骤第一步:配置安全网关接口。
安全网关A
hostname(config)# interface ethernet0/0
hostname(config-if-eth0/0)# zone trust
hostname(config-if-eth0/0)# ip address 10.1.1.2/32
hostname(config-if-eth0/0)# exit
hostname(config)# interface ethernet0/1
hostname(config-if)# zone untrust
hostname(config-if-eth0/1)# ip address 1.1.1.1/24
hostname(config-if-eth0/1)# exit
hostname(config)# interface tunnel1
hostname(config-if-tun1)# zone trust
hostname(config-if-tun1)# exit
安全网关B
hostname(config)# interface ethernet0/0
hostname(config-if-eth0/0)# zone trust
hostname(config-if-eth0/0)# ip address 192.168.1.2/32
hostname(config-if-eth0/0)# exit
hostname(config)# interface ethernet0/1
hostname(config-if-eth0/1)# zone untrust
hostname(config-if-eth0/1)# ip address 1.1.1.2/24
hostname(config-if-eth0/1)# exit
hostname(config)# interface tunnel1
hostname(config-if-tun1)# zone trust
hostname(config-if-tun1)# exit第二步:配置安全网关策略规则。
安全网关A
hostname(config)# policy from trust to trust
hostname(config-policy)# rule from any to any service any permit
Rule id 1 is created
hostname(config-policy)# exit
hostname(config)# policy from untrust to trust
hostname(config-policy)# rule from any to any service any permit
Rule id 2 is created
hostname(config-policy)# exit
安全网关B
hostname(config)# policy from trust to trust
hostname(config-policy)# rule from any to any service any permit
Rule id 1 is created
hostname(config-policy)# exit
hostname(config)# policy from untrust to trust
hostname(config-policy)# rule from any to any service any permit
Rule id 2 is created
hostname(config-policy)# exit第三步:配置路由。
安全网关A
hostname(config)# ip vrouter trust-vr
hostname(config-vrouter)# ip route 192.168.1.0/24 tunnel1
hostname(config-vrouter)# exit
安全网关B
hostname(config)# ip vrouter trust-vr
hostname(config-vrouter)# ip route 10.1.1.0/24 tunnel1
hostname(config-vrouter)# exit第四步:配置P1 提议。
安全网关A
hostname(config)# isakmp proposal p1
hostname(config-isakmp-proposal)# authentication pre-share
hostname(config-isakmp-proposal)# group 2
hostname(config-isakmp-proposal)# hash sha
hostname(config-isakmp-proposal)# encryption 3des
hostname(config-isakmp-proposal)# exit
安全网关B
hostname(config)# isakmp proposal p1
hostname(config-isakmp-proposal)# authentication pre-share
hostname(config-isakmp-proposal)# group 2
hostname(config-isakmp-proposal)# hash sha
hostname(config-isakmp-proposal)# encryption 3des
hostname(config-isakmp-proposal)# exit
第五步:配置ISAKMP 网关。
安全网关A
hostname(config)# isakmp peer east
hostname(config-isakmp-peer)# interface ethernet0/1
hostname(config-isakmp-peer)# isakmp-proposal p1
hostname(config-isakmp-peer)# peer 1.1.1.2
hostname(config-isakmp-peer)# pre-share hello1
hostname(config-isakmp-peer)# exit
安全网关B
hostname(config)# isakmp peer east
hostname(config-isakmp-peer)# interface ethernet0/1
hostname(config-isakmp-peer)# isakmp-proposal p1
hostname(config-isakmp-peer)# peer 1.1.1.1
hostname(config-isakmp-peer)# pre-share hello1
hostname(config-isakmp-peer)# exit第六步:配置P2 提议
安全网关A
hostname(config)# ipsec proposal p2
hostname(config-ipsec-proposal)# protocol esp
hostname(config-ipsec-proposal)# hash sha
hostname(config-ipsec-proposal)# encryption 3des
hostname(config-ipsec-proposal)# exit
安全网关B
hostname(config)# ipsec proposal p2
hostname(config-ipsec-proposal)# protocol esp
hostname(config-ipsec-proposal)# hash sha
hostname(config-ipsec-proposal)# encryption 3des
hostname(config-ipsec-proposal)# exit
第七步:配置名为VPN 的隧道。
安全网关A
hostname(config)# tunnel ipsec vpn auto
hostname(config-tunnel-ipsec-auto)# ipsec-proposal p2
hostname(config-tunnel-ipsec-auto)# isakmp-peer east
hostname(config-tunnel-ipsec-auto)# id local 10.1.1.0/24 remote
192.168.1.0/24 service any
hostname(config-tunnel-ipsec-auto)# exit
hostname(config)# interface tunnel1
hostname(config-if-tun1)# tunnel ipsec vpn
hostname(config-if-tun1)# exit
安全网关B
hostname(config)# tunnel ipsec vpn auto
hostname(config-tunnel-ipsec-auto)# ipsec-proposal p2
hostname(config-tunnel-ipsec-auto)# isakmp-peer east
hostname(config-tunnel-ipsec-auto)# id local 192.168.1.0/24
remote 10.1.1.0/24 service any
hostname(config-tunnel-ipsec-auto)# exit
hostname(config)# interface tunnel1
hostname(config-if-tun1)# tunnel ipsec vpn
hostname(config-if-tun1)# exit
完成以上配置后,安全网关A 和安全网关B 之间的安全隧道便建立成功了。子网(10.1.1.0/24)与Server1 代表的子网(192.168.1.0/24)之间的数据流将会被加密传输。

- 评论:(0)
- 引用通告
发表评论点击这里获取该日志的TrackBack引用地址