拓扑如下:
描述:
1、PA与ASA间建立标准L2L IPSec VPN, PA与Router以SVTI方式建立VPN
2、使用的保护策略:
IKE:
加密算法:3DES
散列算法:SHA1
DH组:Group2
认证方式:预共享密钥(Pre-Shared Key)
预共享密钥内容:Wiser001
IPSec:
加密算法:3DES
散列算法:SHA1
PFS:无
3、IP编址与使用接口如图所示,PA与路由器间SVTI隧道口IP为172.16.0.1和3
4、PaloAlto连接内部PA_Inside的接口Zone划入Inside,其他接口划入Outside。vpn使用的隧道接口划入VPN_Tun
4、所有带有Inside的路由器代表各待加密的内部网络。
5、Mgmt为PA网管口
各设备初始化:
PaloAlto配置:
首先在Console以默认密码admin/admin登入并初始化配置管理接口网络
admin@PA-VM>configure
admin@PA-VM#set deviceconfig system ip-address 192.168.147.201 netmask 255.255.255.0
admin@PA-VM#set deviceconfig system default-gateway 192.168.147.2
admin@PA-VM#commit
在浏览器中打开 https://192.168.147.201 使用默认用户名密码登入管理页面,此时会提示用户使用的是默认管理员用户凭据,需要首先修改它,做实验暂且不管。。。确定进入主界面
在Network -> Interfaces中设定端口信息。以e1/1为例,设置端口类型为三层口,分别创建并设置接口zone、虚拟路由器及IP地址。为实验方便,我创建并调用一个Management Profile允许ping。
完成后,提交保存。
ASA配置:
enable
configure terminal
hostname ASA
inter e0
ip address 12.0.0.2 255.255.255.0
nameif outside
no shutdown
inter e1
ip address 10.0.2.1 255.255.255.0
nameif inside
no shutdown
access-list out permit icmp any any
access-list out permit esp any any
access-list out permit udp any any eq isakmp
access-group out in interface outside
route outside 0 0 12.0.0.1
end
write
Router配置:
enable
configure terminal
hostname Router
interface e0/0
ip address 13.0.0.3 255.255.255.0
no shutdown
interface e0/1
ip address 10.0.3.1 255.255.255.0
no shutdown
ip route 0.0.0.0 0.0.0.0 13.0.0.1
end
write
各Inside路由器配置:
PA_Inside:
enable
configure terminal
hostname PA_Inside
interface e0/0
ip address 10.0.1.10 255.255.255.0
no shutdown
ip route 0.0.0.0 0.0.0.0 10.0.1.1
end
write
FW_Inside:
enable
configure terminal
hostname FW_Inside
interface e0/0
ip address 10.0.2.10 255.255.255.0
no shutdown
ip route 0.0.0.0 0.0.0.0 10.0.2.1
end
write
Router_Inside:
enable
configure terminal
hostname Router_Inside
interface e0/0
ip address 10.0.3.10 255.255.255.0
no shutdown
ip route 0.0.0.0 0.0.0.0 10.0.3.1
end
write
使用ping测试各加密点间直连通讯正常。
配置PaloAlto与ASA间的标准IPSec L2L VPN:
PaloAlto方面:
1、配置IKE Crypto。分别添加DH组算法、散列算法及加密算法。
2、配置IPSec Crypto。分别设置加密算法、散列算法及PFS DH组
3、配置IKE Gateway。我理解就是配置对等体Peer的信息。此处需配置使用的接口及IP地址,以及远端加密点的IP地址和预共享密钥。
在Advanced Phase1 Option中,配置要使用的IKE Crypto Profile。由于强迫症,我把上面的交互模式强制为Main mode。实际不改也没啥关系。
4、配置隧道接口。接口名为tunnel.2,配置好虚拟路由器及Zone。由于本例中使用的是所谓基于策略(Policy Based)的VPN,所以本隧道口不需要配置IP地址。
5、配置IPSec Tunnel。设定名称、使用的隧道接口名称,设置使用的IKE Gateway,以及IPSec Crypto Profile。
由于是Policy Based VPN,此处需要在Proxy IDs中设定能够通过该隧道穿越的流量。也就相当于感兴趣流。
6、设置流量穿越VPN隧道。添加一条静态路由,通过隧道接口发送。同样由于是Policy Based VPN,此处不需要设定下一跳地址。
7、设定安全策略,允许VPN连接。实际上最主要是放行outside zone的设备到本机outside zone接口的ciscovpn ike ipsec三项即可。但是保存的时候会提示由于存在依赖关系dtls ssl也需要房型,那么就一起放了吧。。。同时,为了实验方便,再新建一条策略,使通过VPN隧道传入的流量能够ping处于Inside Zone 的 PA_Inside。
ASA方面:
configure terminal
access-list vpnflow permit ip 10.0.2.0 255.255.255.0 10.0.1.0 255.255.255.0
crypto ikev1 policy 10
encryption 3des
hash sha
group 2
authentication pre-share
exit
crypto ipsec ikev1 transform-set ts esp-3des esp-sha-hmac
tunnel-group 12.0.0.1 type ipsec-l2l
tunnel-group 12.0.0.1 ipsec-attributes
ikev1 pre-shared-key Wiser001
crypto map asa 10 match address vpnflow
crypto map asa 10 set ikev1 transform-set ts
crypto map asa 10 set peer 12.0.0.1
crypto ikev1 enable outside
crypto map asa interface outside
测试:
Ping包测试:
从ASA上查看ike sa及ipsec sa:
从PA上查看Session信息:
标准VPN的配置到此结束。
配置PaloAlto与Router间的使用SVTI的IPSec L2L VPN:
PaloAlto方面:
1、IKE Crypto及IPSec Crypto配置套用上面的例子中的配置
2、建立新的IKE Gateway。此处配置与上面的配置类似,实际上只是区别于IP地址
同样的IKE Crypto Profile,同样的强迫症问题。。。
3、建立新的隧道接口。本接口命名为tunnel.3,划入虚拟路由器及VPN_Tun区域。
由于SVTI VPN是基于路由(Route Based)的,此处需要对该隧道接口设定IP地址。
4、建立IPSec Tunnel。选择接口为刚刚建立的隧道接口,选择IKE Gateway和IPSec Crypto Profile。下面的Tunnel Monitor我个人理解应当是自动监测隧道状态的一个机制,每隔一定时间向该处填写的IP地址发送一个ping包。我在Router处debug ip icmp看了一下,好像确实是这么个意思。
由于是Route Based VPN,所以此处不需要设置Proxy IDs,通过路由自动判断需要通过vpn隧道的流量。
5、设定流量穿越VPN隧道。此处设定一条固定路由通过该隧道,并指定下一跳地址为隧道对端tunnel口的地址。
Router方面:
configure terminal
ip access-list extended vpnflow
permit ip 10.0.3.0 0.0.0.255 10.0.1.0 0.0.0.255
exit
crypto isakmp key 0 Wiser001 address 13.0.0.10
crypto isakmp policy 10
encryption 3des
hash sha
authentication pre-share
group 2
exit
crypto ipsec transform-set ts esp-3des esp-sha-hmac
exit
crypto ipsec profile ipsecprof
set transform-set ts
exit
interface tunnel 0
ip address 172.16.0.3 255.255.255.0
tunnel source 13.0.0.3
tunnel destination 13.0.0.1
tunnel mode ipsec ipv4
tunnel protection ipsec profile ipsecprof
exit
ip route 10.0.1.0 255.255.255.0 172.16.0.1
end
write
测试:
Ping包测试:
从Router上观察SA信息及连接信息:
从PA上观察session信息