具体原理及参数可以参考:https://blog.51cto.com/14227204/2449696
这里我就不详细说明了,大致原理都一样,我就直接开整了
1、环境如下:
2、开始配置(自行配置接口IP)
ASA 配置如下:
ciscoasa> en
Password:
ciscoasa# conf t
ciscoasa(config)# int e 0/0
ciscoasa(config-if)# nameif inside
INFO: Security level for "inside" set to 100 by default.
ciscoasa(config-if)# ip add 192.168.0.1
ciscoasa(config-if)# no shutdown
ciscoasa(config-if)# exit
ciscoasa(config)# int e 0/1
ciscoasa(config-if)# nameif outside
INFO: Security level for "outside" set to 0 by default.
ciscoasa(config-if)# ip add 200.0.0.2
ciscoasa(config-if)# no shutdown
ciscoasa(config)# route outside 0 0 200.0.0.1 # 0代表0.0.0.0
# ASA中的AAA默认开启,所以不需要手动开启了
ciscoasa(config)# username zhangsan password 123123 # 配置AAA认证用户
ciscoasa(config)# crypto isakmp enable outside # 开启IKE协商功能
# 阶段一:指定管理连接的相关参数,加密算法等
ciscoasa(config)# crypto isakmp policy 10
ciscoasa(config-isakmp-policy)# encryption 3des
ciscoasa(config-isakmp-policy)# hash sha
ciscoasa(config-isakmp-policy)# authentication pre-share
ciscoasa(config-isakmp-policy)# group 2
ciscoasa(config-isakmp-policy)# exit
ciscoasa(config)# ip local pool test-pool 192.168.1.200-192.168.1.210 # 创建地址池
ciscoasa(config)# access-list split-acl permit ip 192.168.0.0 255.255.255.0 any # 编写ACl
ciscoasa(config)# group-policy test-group internal
ciscoasa(config)# group-policy test-group attributes
ciscoasa(config-group-policy)# split-tunnel-policy tunnelspecified
ciscoasa(config-group-policy)# split-tunnel-network-list value split-acl
ciscoasa(config-group-policy)# exit
ciscoasa(config)# tunnel-group test1-group type ipsec-ra
ciscoasa(config)# tunnel-group test1-group general-attributes
ciscoasa(config-tunnel-general)# address-pool test-pool # 应用所创建的地址池
ciscoasa(config-tunnel-general)# default-group-policy test-group
ciscoasa(config-tunnel-general)# exit
ciscoasa(config)# tunnel-group test1-group ipsec-attributes
ciscoasa(config-tunnel-ipsec)# pre-shared-key 321321 # 配置组密钥
ciscoasa(config-tunnel-ipsec)# exit
ciscoasa(config)# crypto ipsec transform-set test-set esp-3des esp-sha-hmac
ciscoasa(config)# crypto dynamic-map test-dymap 1 set transform-set test-set
ciscoasa(config)# crypto map test-stamap 1000 ipsec-isakmp dynamic test-dymap
ciscoasa(config)# crypto map test-stamap int outside # 应用到接口
客户端安装也可参考:https://blog.51cto.com/14227204/2449696 (后半部分)
3、验证
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。