一、概述: 在实际工作中经常可以看到深信服的SSL VPN可以旁路部署,并且支持路由模式和NAT模式:路由器模式需要内网对VPN分派的地址池地址可路由器;NAT模式,VPN客户端访问内网主机时,内网主机看到的地址为VPN接口地址,因此不需要VPN地址池的地址内网可路由。如是想测试一下思科的设备这种部署方式,先测试L2L和EzVPN,如果有时间准备再测试一下SSLVPN。 二、基本思路: A.总部的L2L VPN和EzVPN都用Dynamic VTI方式配置 三、测试拓扑: 四、基本配置: interface Loopback0 ip address 172.16.1.1 255.255.255.0 interface Ethernet0/0 ip address 202.100.2.1 255.255.255.0 no shut ip route 0.0.0.0 0.0.0.0 202.100.2.10 四:NAT配置: A.动态PAT: ①ASA842: object network INSIDE_Net subnet 192.168.1.0 255.255.255.0 nat (Inside,Outside) dynamic interface object network DMZ_Net subnet 10.1.1.0 255.255.255.0 nat (DMZ,Outside) dynamic interface --开启ICMP审查: policy-map global_policy class inspection_default inspect icmp --测试: Inside_Router#ping 202.100.1.10 Type escape sequence to abort. Type escape sequence to abort. Type escape sequence to abort. crypto keyring Branch pre-shared-key address 202.100.2.1 key cisco crypto isakmp policy 10 encr 3des hash md5 authentication pre-share group 2 crypto isakmp profile isakmp_profile keyring Branch match identity address 202.100.2.1 255.255.255.255 virtual-template 1 ②第二阶段转换集: crypto ipsec transform-set transet esp-des esp-md5-hmac ③配置ipsec profile crypto ipsec profile ipsec_profile set transform-set transet set isakmp-profile isakmp_profile ④配置虚拟模板接口并调用IPSEC Profile interface Loopback100 ip address 1.1.1.1 255.255.255.0 interface Virtual-Template1 type tunnel ip unnumbered Loopback100 tunnel source Ethernet0/0 tunnel mode ipsec ipv4 tunnel protection ipsec profile ipsec_profile ⑤配置动态路由: router ospf 1 router-id 1.1.1.1 log-adjacency-changes network 1.1.1.0 0.0.0.255 area 0 ---尝试过建Inside区域内网通过OSPF重分布给Branch路由器,不知为什么没有成功,Branch路由器的OSPF数据库里面是有该条目的。 B.Branch: ①第一阶段策略: crypto isakmp policy 10 encr 3des hash md5 authentication pre-share group 2 crypto isakmp key cisco address 202.100.1.1 ②第二阶段转换集: crypto ipsec transform-set transet esp-des esp-md5-hmac ③配置ipsec profile crypto ipsec profile ipsec_profile set transform-set transet ④配置tunnel接口并在上面调用ipsec profile interface Tunnel0 ip address 1.1.1.100 255.255.255.0 tunnel source Ethernet0/0 tunnel destination 202.100.1.1 tunnel mode ipsec ipv4 tunnel protection ipsec profile ipsec_profile ⑤配置动态路由: router ospf 1 router-id 1.1.1.100 passive-interface Loopback0 network 1.1.1.100 0.0.0.0 area 0 network 172.16.1.1 0.0.0.0 area 0 ⑥配置静态路由: ----因为ASA的inside内网区域的网段无法通过动态路由学到,因此只能添加静态路由 ip route 192.168.1.0 255.255.255.0 tunnel 0 六.L2L VPN效果测试: A.配置ASA842策略: access-list DMZ extended permit icmp any any access-list DMZ extended permit tcp 172.16.1.0 255.255.255.0 host 192.168.1.1 eq telnet access-list DMZ extended permit tcp host 10.1.1.1 host 192.168.1.1 eq telnet ---第三条ACE是为了后面NAT方式测试而添加的 access-group DMZ in interface DMZ B.路由模式测试: ①ASA842添加Branch身后网段的路由到DMZ_VPN: route DMZ 172.16.1.0 255.255.255.0 10.1.1.1 1 ②测试: Branch#telnet 192.168.1.1 /source-interface l0 Trying 192.168.1.1 ... Open User Access Verification Password: Password: Inside_Router>show user *Mar 1 06:56:11.082: RT: NET-RED 0.0.0.0/0s Line User Host(s) Idle Location 0 con 0 idle 02:27:46 *130 vty 0 idle 00:00:00 172.16.1.1 Interface User Mode Idle Peer Address Password: Interface User Mode Idle Peer Address crypto isakmp client configuration group Ezvpn_group pool MYPool acl Split_INSIDE ④第2阶段转换集配置: crypto ipsec transform-set ezvpnset esp-des esp-md5-hmac ----可以与L2L VPN共用 ⑤配置isakmp profile: crypto isakmp profile isakmp_profile match identity group cisco isakmp authorization list default client authentication list Xauth client configuration address respond virtual-template 2 -----注意模板编号不能与L2L VPN相同 ⑥配置ipsec profile: crypto ipsec profile EzVPN_ipsec_profile set transform-set transet set isakmp-profile EzVPN_isakmp_profile ⑦配置虚拟模板并调用ipsec profile: interface Virtual-Template2 type tunnel ip unnumbered Ethernet0/0 tunnel source Ethernet0/0 tunnel mode ipsec ipv4 tunnel protection ipsec profile EzVPN_ipsec_profile B.EzVPN客户端: ---不知道是否是EzVPN客户端原因,拨通之后没有隧道分割对应路由,需要手工添加: ----可以看到连接的地址为VPN地址池的地址 ----可以看到,telnet到Inside路由器,路由器看到的地址为DMZ_VPN的接口地址。 |
不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流
GMT+8, 2025-8-21 01:08 , Processed in 0.065288 second(s), 16 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.